Commit Graph
758 Commits
Author SHA1 Message Date
Arun Kumar Mohan fbb8af12e1 ceph: adding '--upgrade' option to external script
An '--upgrade' option is added to the option list, which upgrades the user
permissions (caps) to match newer version. Will try to detect
'rgw-pool-prefix' or user can provide it through the argument.

Segregated the command line arguments into three groups, common, output and
upgrade

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-10-09 18:59:25 +05:30
Travis Nielsen e2cf76a15e Merge pull request #6343 from leseb/fix-6329
ceph: only support one external cluster secret
2020-09-29 08:23:26 -06:00
Sébastien Han 08944c4e50 ceph: only support one external cluster secret
We do not support providing both ROOK_EXTERNAL_USER_SECRET and
ROOK_EXTERNAL_ADMIN_SECRET. When both are provided in the mon secret,
the operator code will use the client.admin user for all its operations.
This will break some of the logic when creating OBC since if
client.admin is detected we assume the cluster is converged and thus
pass args like this:

```
--rgw-realm=external-store --rgw-zonegroup=external-store --rgw-zone=external-store
```

To the radosgw-admin command, which won't work since Rook has no idea
what the external realm/zonegroup/zone are, if any are configured.

This fix should be sufficient for now, but moving forward we should
probably enhance clusterInfo with an "isExternal" property to make
things easier. Also supporting external realm/zonegroup/zone would be
nice. This will probanly hit 1.5 once this code is promoted to stable.
See: https://github.com/rook/rook/issues/6342

Closes: https://github.com/rook/rook/issues/6329
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-29 11:06:19 +02:00
Madhu Rajanna 2fa3e71733 ceph: update cephcsi to v3.1.1
as cephcsi v3.1.1 is released today
with many bug fixes and enhancements,
more details can be found at
https://github.com/ceph/ceph-csi/releases/tag/v3.1.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-29 14:03:44 +05:30
Mudit Agarwal c547b36aa0 ceph: update csi sidecar images
This PR makes the changes in csi templates and
upgrade documentation required for updating
csi sidecar images.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-28 18:58:52 +05:30
Tim Hughes 406d3f44f8 docs: remove compression from test yamls
Signed-off-by: Tim Hughes <thughes@thegoldfish.org>
2020-09-24 22:46:43 +01:00
Tim Hughes 363baeb19b docs: changes example yamls to use parameters.compression_mode
Makes compression_mode in example yamls consistent

Closes: https://github.com/rook/rook/issues/6318
Signed-off-by: Tim Hughes <thughes@thegoldfish.org>
2020-09-24 18:59:15 +01:00
Travis Nielsen 02fa0eb921 Merge pull request #6228 from Madhu-1/fix-ownerref
ceph: remove owner reference set by rook on csidriver
2020-09-18 10:09:36 -06:00
Varsha Rao 9a4403b55e ceph: update about 'rook' module in cluster.yaml
'rook' module is not enabled by default. So update the wrong comment about it.

Signed-off-by: Varsha Rao <varao@redhat.com>
2020-09-18 20:10:55 +05:30
Sébastien Han 451622a955 ceph: add rbd-mirror configuration
Rook is now capable of configuring mirroring between sites. The
implementation works at different levels:

* CephBlockPool: which introduces a new `mirroring` configuration as well
as `statusCheck`. When turned on, Rook will enable mirroring on the
pool. It will also create a bootstrap peer token and store it in a
Kubernetes Secret. The name of that Secret can be found in the Status
field of the CephBlockPool CRD. This token can be fetched and used by
other clusters to configure the site as a peer. Mirroring can be
configured either at the pool or the image level.

* CephRBDMirror: which introduces a new `peers` configuration allowing
Rook to connect to peers by passing a Secret name. The administrator will
create a Kubernetes Secret with 2 keys: 'token' for the bootstrap peer
token and 'pool' for the name of pool. Once detected the rbd-mirror
controller will go ahead and import the peer configuration.

Pool mirroring status example:

```
status:
  info:
    rbdMirrorBootstrapPeerSecretName: pool-peer-token-test
  mirroringInfo:
    lastChanged: "2020-09-17T14:47:27Z"
    lastChecked: "2020-09-17T14:48:27Z"
    summary:
      summary:
        mode: image
        peers:
        - client_name: client.rbd-mirror-peer
          direction: rx-tx
          mirror_uuid: ""
          site_name: rhcs
          uuid: c50522a4-28a4-4bd3-ba68-e11780308882
        site_name: 91eae0dd-06b1-4d2c-91f3-1311c9df382b-rook-ceph
  mirroringStatus:
    lastChecked: "2020-09-17T14:48:27Z"
    summary:
      summary:
        daemon_health: OK
        health: OK
        image_health: OK
        states:
          replaying: 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-17 19:05:04 +02:00
Madhu Rajanna a1024ebc75 ceph: remove owner reference set by rook on csidriver
currently, we are setting the rook operator as owner
on the csidriver objects,  as csidriver is cluster
scoped object we should not set namespaced object as
owner on cluster scoped object

fixes #6162

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-15 11:39:27 +05:30
Arun Kumar Mohan 3de87ccd35 ceph: fix to support TLS enabled rgw-endpoint
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-09-11 12:14:56 +05:30
subhamkrai badf2887bb ceph: update object prefixed manifests and related docs
apply latest changes to prefixed manifests and
related docs.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-03 12:17:15 +05:30
Servesha Dudhgaonkar 0c323439a6 ceph: purge a down osd with a job
If an OSD is down and needs to be removed from the cluster,
a job can be run that will remove the OSD deployment
and purge the OSD from ceph. If the OSD is still up,
the purge will be rejected.

To purge multiple OSDs at the same time, the OSD IDs can be
specified as a comma-separated list.

Signed-off-by: Servesha Dudhgaonkar <sdudhgao@redhat.com>
2020-09-01 09:36:20 +02:00
Raghavendra TalurandNitin Goyal f8a721dbb0 ceph: doc additions for the uninstall mode
Add documentation for the setting AllowUninstallWithVolumes to the
following files:
Documentation/ceph-cluster-crd.md
cluster/examples/kubernetes/ceph/cluster.yaml

Co-authored-by: Nitin Goyal <nigoyal@redhat.com>
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
2020-08-31 14:07:32 -04:00
Alexander Trost a87c00ddee ceph: allow user to add labels to pods
This allows users to specify additional labels to be added to the components
created by the Rook Ceph operator.
Additionally the rbd mirrors are now getting their annotations and
labels set.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-25 19:38:51 +02:00
Jared Watts 06ab07be8b Merge pull request #5863 from prksu/nfs-provisioner
nfs: nfs provisioner controlled by operator
2020-08-24 16:26:23 -07:00
Madhu Rajanna 0aa0957bf1 ceph: remove preStop from daemonset template
The lifecycle preStop hook fails on container stop / exit
because /bin/sh is not present in the driver registrar container
image.

the driver-registrar will remove the socket file
before stopping. we dont need to have any preStop hook
to remove the socket as it was not working as expected

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 19:25:44 +05:30
Ahmad Nurus S 5cc2ceda2d nfs: make provisioner as sidecar of nfs server
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-08-21 16:40:33 +07:00
Alexander Trost be16bc455f docs: operator use rbac.authorization.k8s.io/v1
This replaces any uses of `rbac.authorization.k8s.io/v1beta1` with
`rbac.authorization.k8s.io/v1` affecting RBAC objects like ClusterRole
and ClusterRoleBindings, etc. to make it consistent.
This is done as some RBAC objects used the `v1beta1` and others already
using `v1`.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-20 12:08:32 +02:00
Travis Nielsen 0bcf040bd7 Merge pull request #6123 from subhamkrai/sync-manifests
ceph: applying latest changes to object-prefixed manifests
2020-08-19 10:11:41 -06:00
Sébastien Han d5b1e89ce2 Merge pull request #6118 from travisn/osd-prepare-resources
ceph: Set the OSD prepare resources
2020-08-19 15:38:06 +02:00
subhamkrai 99cc3692fe ceph: applying latest changes to object-prefixed manifests
the commit apply latest changes or sync the
object-prefixed manifests with object.yaml
and keeping object-test.yaml simple and
without lastest change.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-08-19 15:04:32 +05:30
Travis Nielsen 18d39d909e ceph: set the osd prepare resources
The osd prepare resources were only being set on the main container
while the init containers either did not have resources set, or were
inheriting the resource settings from the device set resources for osds.
Now the osd prepare resources will be consistently set based on the
prepareosd resources in the main section of the cluster CR.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-18 22:58:26 -06:00
Travis Nielsen 0ffa0348b5 ceph: separate placement for osd prepare jobs from osd daemons
The osd prepare jobs and osd daemons may have different placement
requirements. In particular, the topology spread constraints
or pod anti-affinity should only work on either the prepare job or
osd daemon, but does not work effectively on both types at the same
time. Therefore, we split out the osd prepare placement to be separate
from the osd daemon placement. If the osd prepare placement is not set
the operator will fall back to the osd daemon placement for
backward compatibility.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-18 15:24:04 -06:00
Alexander Trost f819404113 Merge pull request #6099 from cloudical-io/fix_13_upgrade_apply_file
ceph: fix v1.3 to v1.4 upgrade apply file syntax
2020-08-17 22:51:43 +02:00
Alexander Trost d16a778cc5 ceph: fix v1.3 to v1.4 upgrade apply file syntax
There is a missing YAML document / object separator in the apply file.
This PR adds it so it can be applied without errors.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-17 22:46:05 +02:00
Sébastien Han b4208f4a55 Merge pull request #6090 from leseb/fix-rgw-healthcheck
ceph: fix object store healthcheck yaml
2020-08-17 17:32:15 +02:00
Sébastien Han a5982b749f ceph: fix object store yaml example
The healthcheck for the bucket is called `bucket`.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-17 17:24:26 +02:00
Arun Kumar Mohan a5b4020d80 ceph: making rbd / cephs provisioner and nodes optional
Some more optional items in json output.
RBD Provisioner, CSI CephFS node and provisioner are now optional and
will only be populated if they are available.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-08-17 19:32:26 +05:30
Arun Kumar Mohan 940118af82 ceph: a minor refactoring of external cluster resources script
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-08-17 18:57:00 +05:30
Travis Nielsen 7481993959 Merge pull request #6017 from humblec/ceph-csi-snapshotter
Add/update ceph csi snapshotter rbac and sidecar deployments
2020-08-13 12:32:35 -06:00
Humble Chirammal 97a3283099 ceph: add snapshot create/delete and restore doc for cephfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 22:17:01 +05:30
subhamkrai e21854145a ceph: disable object store port when secureport specified
currently, the object store schema requires the
port to be non-zero. This does not allow http
access to the object store to be disabled.
so setting the port minimum to 0 to from 1 in the cr.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-08-12 21:57:01 +05:30
Sébastien Han cc691cfa57 Merge pull request #6039 from leseb/fix-1867998
ceph: do not validate default.rgw.buckets.index
2020-08-11 16:14:39 +02:00
Sébastien Han 0c8d20ffb4 ceph: do not validate default.rgw.buckets.index
This pool is not present when this is no bucket yet. So we don't need to
validate its presence.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-11 14:49:18 +02:00
Sébastien Han 5c85640037 ceph: fix lint on python script
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-11 14:47:35 +02:00
Sébastien Han d91f55e8ed Merge pull request #5580 from silverhandy/master
ceph: add support for wal device for OSD on PVC
2020-08-11 13:57:56 +02:00
Humble Chirammal cbc41a8eba ceph: add rbac for cephfs provisioner in 1.3-upgrade template
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-11 16:19:19 +05:30
Travis Nielsen 67b8491d2c ceph: test cluster settings for mon failover interval
For test scenarios, add the settings to the example for mon health checks
so it is simpler to test the failover.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-10 14:42:38 -06:00
Travis Nielsen f710b79d40 docs: clarify running privileged with selinux
The operator setting ROOK_HOSTPATH_REQUIRES_PRIVILEGED is expected to be true
when selinux is enabled, not just with openshift.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-10 14:37:13 -06:00
Travis Nielsen 70d96f7814 Merge pull request #6014 from mridulv/mridul-add-crushRoot-crds
ceph: adding ability to specify crushroot in the CRD
2020-08-10 14:13:18 -06:00
Anmol Sachan c35f31bcf2 ceph: removed the storage provisioners usage rules
In the interest of having the metrics avaliable generically for all the storage provisioners and just not ceph, the superseding metrics will be added to Openshift directly. Thus these metrics wont be required in rook.

Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
2020-08-10 16:48:24 +05:30
Humble Chirammal 801b2a5852 ceph: add cephfs snapshotter rbac to cephfs provisioner role
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-10 11:31:30 +05:30
Humble Chirammal a795ff01e0 ceph: add cephfs examples yamls for restore,clone and snapshotclass
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-10 11:31:10 +05:30
Humble Chirammal dacc013cc9 ceph: add csi-snapshotter sidecar to cephfs deployment
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-10 11:27:05 +05:30
Chen, Tingjie 0e87348093 ceph: add support for wal device for OSD on PVC
Based on the feature of metadata PVC for OSD: #4818, add the wal device.

For this, you need to create a new volumeClaimTemplates, its name must be "wal", if "wal" is
set, "metadata" device will refers specially for block.db device, and "wal" refers for block.wal
device in BlueStore.

A template will look like this:

```
volumeClaimTemplates:
- metadata:
    name: data
  spec:
    resources:
      requests:
        storage: 10Gi
    # IMPORTANT: Change the storage class depending on your environment (e.g. local-storage, gp2)
    storageClassName: gp2
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
- metadata:
    name: metadata
  spec:
    resources:
      requests:
        storage: 6Gi
    # IMPORTANT: Change the storage class depending on your environment (e.g. local-storage, io1)
    storageClassName: io1
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
- metadata:
    name: wal
  spec:
    resources:
      requests:
        storage: 6Gi
    # IMPORTANT: Change the storage class depending on your environment (e.g. local-storage, io1)
    storageClassName: io1
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
```

We now map block, block.db and block.wal directly inside the container instead of
running ceph-volume activate.

Signed-off-by: Chen, Tingjie <tingjie.chen@intel.com>
2020-08-10 08:48:20 +08:00
mridulv 30cd786303 ceph: adding ability to specify crushroot in the CRD
Previously we did not supported defining crushRoot in some of the CRDs. With this fix, we plan to fix this behaviour.

Signed-off-by: mridulv <mridulv09@gmail.com>
2020-08-08 16:24:15 +05:30
Unai Arrien f6087b280a docs: add provisioner prefix namespace comment in ceph csi examples
Signed-off-by: Unai Arrien <unaittxu@gmail.com>
2020-08-07 15:39:36 +02:00
Sébastien Han f936ad3cbf Merge pull request #5680 from umangachapagain/rbd-pool-stats
Add spec to enable/disable RBD pool stats collection
2020-08-06 10:53:49 +02:00