Commit Graph
13292 Commits
Author SHA1 Message Date
Travis Nielsen ee5ce2e14f Merge pull request #9512 from leseb/fix-9493
core: run discover daemonset as root uid
2022-01-04 09:53:23 -07:00
Travis Nielsen 9f841eda7d Merge pull request #9515 from leseb/fix-csv-name-ocp
build: use the same csv name for all platforms
2022-01-04 09:40:25 -07:00
Sébastien Han 7cf9285501 build: use the same csv name for all platforms
Recently with the directory renaming to "deploy/olm" the CSV name
changed from "ceph" to "olm". Now we are using the same "rook-ceph" name
regardless of the platform.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-04 14:15:22 +01:00
Sebastian Riese 283d31e0db rgw: swift design document: configure swift in a new section
Instead of mixing configuration for different protocols in the gateway
section, depending on the type option, introduce a new section protocols for
API specific configuration.

This allows configuring s3 and swift in one RGW and at the same time
simplifies validation of the CRD and allows for a clean separation of
concerns.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-01-03 13:46:38 +01:00
Sebastian Riese 90a37ddd22 rgw: swift design document: clarify specification
* add annotations to the examples of new CR fields

* add links to external documentation

* clarify language issues raised in review

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-01-03 13:46:33 +01:00
Sébastien Han dd67b866dc core: run discover daemonset as root uid
So that the tool inside the container has the permission to run
correctly, e.g: sgdisk.

Clsoes: https://github.com/rook/rook/issues/9493
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-03 12:36:23 +01:00
Satoru Takeuchi 376ca62f8a Merge pull request #9491 from rspier/patch-1
Update ceph-monitoring.md
2021-12-28 16:35:49 +09:00
Robert Spier a60b154c76 docs: fix indentation
Fix indentation for `monitoring:` block example.  It belongs inside the
`spec:`.

Signed-off-by: Robert Spier <rspier@pobox.com>
2021-12-26 21:23:52 -08:00
Satoru Takeuchi 32e7084e88 Merge pull request #9489 from cybozu-go/add-helm-to-build-requirements
build: add missing helm
2021-12-27 12:39:45 +09:00
Satoru Takeuchi a7b5f06622 build: add missing helm
If helm is not install, `make` fails with the following log.

```console
./build/rbac/get-helm-rbac.sh: line 25: helm: command not found
```

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-12-27 02:13:32 +00:00
Yuval Lifshitz 11727b1673 rgw: add events to CephBucketNotification CR
the events are used to mark the start/success/failure of the reconciliation
and also to log the bucket names on which the CephbucketNotification is
created

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-12-26 16:58:49 +02:00
Blaine Gardner c07d89d9ea core: rgw: allow specifying daemon startup probes
Allow specifying daemon startup probes where we also allow configuring
liveness probes. Startup probes allow Rook to tolerate when Ceph daemons
occasionally take a long time to start up while not also making
Kubernetes liveness probes slower to detect runtime failures of daemons.

Startup probes are beta in Kubernetes 1.18, so we should not enable
probes by default for earlier Kubernetes versions.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-21 15:12:41 -07:00
Blaine Gardner bb0d0d39f6 Merge pull request #9384 from leseb/fix-7036
subvolumegroup: add new crd
2021-12-21 10:24:23 -07:00
Blaine Gardner cb1b063e13 Merge pull request #9365 from thotz/bucketnotificationadditionimprovement
object: fix handling for notifications for OBC
2021-12-21 10:23:32 -07:00
Sébastien Han 6e9eb33782 subvolumegroup: add new crd
This introduces a new CRD to add the ability to create subvolumegroup
for a given ceph filesystem volume. Typically the name of the volume is
the name of the filesystem created by rook.

Closes: https://github.com/rook/rook/issues/7036
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-21 16:28:38 +01:00
Sébastien Han 77b18f0553 Merge pull request #9434 from leseb/bz-2032656
osd: handle removal of encrypted osd deployment
2021-12-21 16:14:34 +01:00
Sébastien Han 05775b068d osd: handle removal of encrypted osd deployment
This is handling a tricky scenario where the OSD deployment is manually
removed and the OSD never reconvers. This is unlikely to happen, but
still OSD should be able to run after that action. Essentially after a
manual deletion, we need to run the prepare job again to re-hydrate the
OSD information so that the OSD deployment can be deployed.
On encryption, it is a little bit tricky since ceph-volume list again
the main block won't return anything, so we need to target the encrypted
block to list.
There is another case this PR does not handle, which is the removal of
the OSD deployment and then the node is restarted. This means that the
encrypted container is not opened anymore. However, opening it requires
more work like writing the key on the filesystem (if not coming from the
Kubernete secret, eg,. KMS vault) and then run luksOpen. This is an
extreme corner case probably not worth worrying about for now.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-21 10:51:09 +01:00
Sébastien Han fffb862956 Merge pull request #9457 from leseb/fix-9452
core: disallow multiple clusters in the same namespace
2021-12-20 17:18:10 +01:00
Blaine Gardner 9dc41f5796 Merge pull request #9427 from BlaineEXE/always-report-reconcile-events
operator: always report events
2021-12-20 08:42:08 -07:00
Sébastien Han 74de03230f Merge pull request #9473 from vshinde727/patch-1
docs: fixed typo on rbd mirroring documentation
2021-12-20 14:19:04 +01:00
vshinde727 6a0690383a docs: fixed typo on rbd mirroring documentation
Signed-off-by: Vivek Shinde <vshinde@parallelwireless.com>
2021-12-20 15:53:21 +05:30
Satoru Takeuchi 1f9dc0bbfa Merge pull request #9464 from travisn/osd-purge-label
osd: Add label to osd purge job
2021-12-20 16:57:05 +09:00
Satoru Takeuchi d6d2b4ba4e Merge pull request #9465 from travisn/primary-affinity-doc
docs: Recommend primary affinity over hybrid pools
2021-12-20 16:56:01 +09:00
Travis Nielsen 277252a46d docs: recommend primary affinity over hybrid pools
Hybrid pools suffer from lower availability when a node goes down,
so we recommend primary affinity instead of hybrid pools.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-17 15:09:21 -07:00
Travis Nielsen 54d3c09dc4 osd: add label to osd purge job
The label was on the job, but not on the pod template,
so querying for the pod logs was not working as simply
as if we added the label.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-17 15:00:45 -07:00
Travis Nielsen 4c45856edb Merge pull request #9441 from crd1985/master
ceph: fix blockOwnerDeletion error
2021-12-17 09:21:48 -07:00
Sebastian Riese b9a32d0ba0 rgw: swift design document: clarify the section on the openrc secret
The prior formulation which openrc variables take effect was
ambiguous/contradictory.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2021-12-17 16:34:40 +01:00
Sebastian Riese bd7fe77c2f rgw: swift design document: subuser management
Access to the Swift API is granted via subusers. The configuration
of the subusers is added to the cephobjectstoreuser CR.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2021-12-17 16:32:03 +01:00
Sebastian Riese 127c40626a rgw: swift design document: document which CAs are used for accessing keystone
The integration of Keystone includes HTTPS API calls to Keystone. We
document why the CA bundle used to verify those connections,
can't be explicitly configured and how it can be indirectly configured.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2021-12-17 16:29:09 +01:00
Sebastian Riese dc08052c3b rgw: swift-design document: make OBC interaction out-of-scope
It is not clear at this moment whether anyone has a use case for this.
As a workaround you can explicitly generate a user and subuser that
can access the bucket created via OBC.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2021-12-17 16:28:58 +01:00
Sébastien Han 24d022eebb Merge pull request #9453 from BlaineEXE/jumbo-frames-note-in-common-issues
docs: add jumbo frames note to common issues
2021-12-17 14:33:05 +01:00
Jiffin Tony Thottan 9d9acc2db1 object: fix handling for notifications for OBC
Current approach is to delete all the existing notifcations from bucket
and re-add the notification from the labels.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-12-17 16:29:27 +05:30
Sébastien Han da76a772f8 core: disallow multiple clusters in the same namespace
Rook does not support running multiple clusters in the same namespace,
so the operator should not reconcile if a new cluster is added.
The scenario where a cluster is added while the operator is down is also
handled. CR updates are also handled.
When the operator detects more than one cluster it will refuse to
reconcile the CephCluster, and child CRDs will block too until the
operator is ready.
The user must remove one of the clusters before can continue to perform
any reconcile.

Closes: https://github.com/rook/rook/issues/9452
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-17 10:56:15 +01:00
Sébastien Han 52ededd151 core: do not log create event as info
Let's use debug not to clutter logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-17 10:55:31 +01:00
Sébastien Han 97978b5d24 Merge pull request #9189 from subhamkrai/readonly-external-script
security: add dry run mode for external cluster script
2021-12-17 09:45:41 +01:00
Blaine Gardner 6c90d66875 docs: add jumbo frames note to common issues
Resolves #9320

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-16 16:13:43 -07:00
Travis Nielsen 517aff4245 Merge pull request #9439 from y1r/add-cap-mknod-to-psp
osd: add CAP_MKNOD to PSP
2021-12-16 10:57:14 -07:00
Travis Nielsen b7a145eac6 Merge pull request #9418 from travisn/mds-skip-sanity
mds: Skip sanity check during upgrades to 16.2.7
2021-12-16 09:53:51 -07:00
Travis Nielsen 0c19f62df2 mds: skip sanity check during upgrades to 16.2.7
The mons need to be configured to skip the mds sanity check
during upgrade to 16.2.7 or the mons may crash during that
upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-16 08:07:02 -07:00
Sebastian Riese 47c71ce7dd rgw: draft a design document for the Keystone and Swift integration
Ceph RGW supports integrating with OpenStack clouds by providing
the Swift object store API and using Keystone for authentication.
The design document describes how the required configuration shall
be mapped to the Object Store CRD.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2021-12-16 10:55:35 +01:00
Daniel Ruiz Capilla 66cc46220f rgw: fix blockOwnerDeletion error
This restores the missing permissions to allow the object controller to
update the finalizers section in the spec. See https://sdk.operatorframework.io/docs/faqs/

Signed-off-by: Daniel Ruiz Capilla <crd1985@gmail.com>
2021-12-16 09:36:21 +01:00
subhamkrai c891ddb57d security: add dry run mode for external cluster script
Adding dry run mode for external cluster script.
This will add cli argument `--dry-run`. By default
`dry-run` option will be `False`
which means it will only print something like below.

```
Execute: 'ceph fs ls'
Execute: 'ceph fsid'
Execute: 'ceph quorum_status'
Execute: 'ceph auth get-or-create client.healthchecker mon allow r, allow command quorum_status,
	allow command version mgr allow command config osd allow rwx pool=default.rgw.meta, allow r pool=
	.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x
	pool=default.rgw.buckets.index'
Execute: 'ceph mgr services'
Execute: 'ceph auth get-or-create client.csi-rbd-node mon profile rbd osd profile rbd'
Execute: 'ceph auth get-or-create client.csi-rbd-provisioner mon profile rbd mgr allow rw osd
	profile rbd'
Execute: 'ceph status'

```

Signed-off-by: subhamkrai <srai@redhat.com>
2021-12-16 13:05:39 +05:30
Yuichiro Ueno bae6351a39 osd: add CAP_MKNOD to PSP
This commit adds CAP_MKNOD to PodSecurityPolicy to allow OSD-prepare job
creating pods under PSP-enabled Kubernetes cluster.

Signed-off-by: Yuichiro Ueno <ueno@preferred.jp>
2021-12-16 12:36:27 +09:00
Travis Nielsen 07f101e157 Merge pull request #9363 from travisn/configure-built-in-pool
pool: Allow configuration of built-in pools with non-k8s names
2021-12-15 16:03:54 -07:00
Travis Nielsen 60cc67fed4 test: only create replicated pools in ci
Creating an EC pool is causing the CI to hang when the EC
pool is initialized since there aren't enough OSDs to
satisfy the EC parameters.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-15 15:32:03 -07:00
Travis Nielsen 7ee9cc9d56 pool: allow configuration of built-in pools with non-k8s names
The built-in pools device_health_metrics and .nfs created by ceph
need to be configured for replicas, failure domain, etc.
To support this, we allow the pool to be created as a CR.
Since K8s does not support underscores in the resource names
the operator must translate this special pool name into
the name expected by ceph.

This also sets the basis for allowing filesystem data
pools to specify the desired pool name instead of requiring
a generated name.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-15 15:32:02 -07:00
Blaine Gardner da61ac1ae8 operator: always report events
The original PR which added event reporting unnecessarily "optimized" to
prevent spamming the API controller[1].

It is sometimes important to get events as they happen and not hide new
events behind preexisting older events. For example, in integration
tests, we may often want to wait for a controller to finish processing
an update, and the best way to do that is to wait for the
"ReconcileSucceeded" event. In order for this to be useful, the events
must be reported each time.

If we begin having problems with events being reported too often, then
we should fix the underlying issue of reconciles happening too often
instead of relying on a time-based "optimization" that hides recent
event reports that may be useful.

[1]: https://github.com/rook/rook/pull/7222

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-15 15:24:17 -07:00
Travis Nielsen 7a6a62f43b Merge pull request #9386 from leseb/mgr-active-side-car-permissions
mgr: run the watch side car config on /etc/ceph
2021-12-15 12:20:28 -07:00
Blaine Gardner 016ae962c7 Merge pull request #9388 from BlaineEXE/helm-add-monitoring-option
helm: add optional monitoring RBAC to operator chart
2021-12-14 15:35:49 -07:00
Blaine GardnerandMathieu Parent e3be7a30ba helm: add optional monitoring RBAC to operator chart
An older version of the Helm chart always installed RBAC permissions for
enabling monitoring. In an effort to reduce the privileges Rook uses by
default, they were removed. We need to still include the monitoring RBAC
optionally since the change could break some users.

Co-authored-by: Mathieu Parent <mathieu.parent@insee.fr>
Co-authored-by: Blaine Gardner <blaine.gardner@redhat.com>

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-14 15:32:54 -07:00