Commit Graph
2532 Commits
Author SHA1 Message Date
micalgenus a68151e2f2 rgw: gateway deployment strategy rolling on Pacific
When the strategy type of deployment is Recreate, from the moment the end is
started until the new pod is normally running, there is no pod in the
kubernetes service endpoints, so it goes to the service unavailable state.

Therefore, it is necessary to change it to `type: RollingUpdate` instead of
`type: Recreate` so that rolling updates can be made without downtime.

Before Pacific, creating a deployment as much as the instance was okay,
but after Pacific, the replicas was increased in one deployment, so rolling
updates were set up one by one as in the previous version.

Signed-off-by: micalgenus <micalgenus@gmail.com>
2022-01-21 00:27:37 +09:00
Travis Nielsen f3246228d8 Merge pull request #9467 from travisn/update-mgr-service
mgr: Update services when active mgr changes
2022-01-13 12:21:03 -07:00
Sébastien Han cf5f68f378 Merge pull request #9545 from rook/kms-hpcs
osd: add ibm key protect kms
2022-01-13 18:11:15 +01:00
Blaine Gardner 3b415ea15a Merge pull request #9482 from yuvalif/ceph-cloudevent-topic
rgw: add HTTP CloudEvent endpoints to CephBucketNotification CR
2022-01-13 08:40:07 -07:00
Sébastien Han a7acf490b6 osd: add ibm key protect kms
The cluster-wide encryption feature now has a new supported key
management system: IBM Key protect. More information about the backend
can be found in Rook documentation under the

Today's implementation stores OSD encryption keys has "Standard" keys.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-13 16:02:10 +01:00
Travis Nielsen 11127f54ca mgr: update services when active mgr changes
When the active mgr changes, there may be user-created services
that also need to have their selector updated to point to the
new active mgr. Now the operator will update any service in the
rook operator namespace that has the label app=rook-ceph-mgr
to point to the active mgr.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-13 07:25:24 -07:00
Yuval Lifshitz c99e2a37fd rgw: add HTTP CloudEvent endpoints to CephBucketNotification CR
this add a configuration parameter that allows an RGW, from
Ceph Quincy (v17) and on, to send bucket notifications to an HTTP CloudEvents
endpoint.
Header format:
https://github.com/cloudevents/spec/blob/main/cloudevents/adapters/aws-s3.md

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2022-01-13 12:08:40 +02:00
Satoru Takeuchi af88b50fc7 rgw: fix startup probe
It's better to set the same handler to startupProbe as livenessProbe.
Otherwise, we might hit the following problem.

https://github.com/rook/rook/issues/6304

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-01-06 06:20:53 +00:00
Blaine Gardner 5b26cb1b22 Merge pull request #9400 from yuvalif/ceph-notification-events
rgw: add events to CephBucketNotification CR
2022-01-04 12:58:20 -07:00
Blaine Gardner 5b9ac16670 Merge pull request #9468 from BlaineEXE/startup-probes
core: rgw: allow specifying daemon startup probes
2022-01-04 11:03:12 -07: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
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 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
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
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
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 24a77d4fa1 Merge pull request #9296 from degorenko/cephfs-datapools
file: allow to create CephFS dataPools with predefined names
2021-12-14 11:04:49 -07:00
Denis Egorenko 3ff681e81d file: allow to create CephFS data pools with predefined names
Add an ability to create data pools for CephFS with predefined
names.

Related-Issue: rook#9295
Signed-off-by: Denis Egorenko <degorenko@mirantis.com>
2021-12-14 12:52:19 +04:00
Sébastien Han af30b0a5b8 Merge pull request #9417 from BlaineEXE/fix-health-checker-when-force-deleted
pool: file: object: clean up health checkers for force deletion
2021-12-14 09:16:04 +01:00
Blaine Gardner 0c76be8c38 pool: file: object: clean up health checkers for force deletion
When CephBlockPool, CephFilesystem, or CephObjectStore resources are
deleted after removing their finalizer, the code path to stop monitoring
was not stopping monitoring since a non-present resource does not have a
name and namespace attached. When the object is deleted, ensure the
internal representation used to stop monitoring has a name and namespace
to fix the issue.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-13 16:07:01 -07:00
Sébastien Han 5c1e459a6a mgr: run active-watch as root and privileged
For now, we must run the container with UID 0 and privileged for
multiple reasons:

* the rook binary writes ceph config to /var/lib/rook which is owned by
  root
* it's difficult to use /etc/ceph since it will conflict with the
  rook-ceph-override configmap AND is also owned by root since it's a
  mounted configmap.
* using /etc/ceph might be possible but has other issues with rook's
  exec package since the ceph config is built from /var/lib/rook

Closes: https://github.com/rook/rook/issues/9385
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-13 14:02:33 +01:00
Sébastien Han 200fb569f4 Merge pull request #9395 from y1r/add-context-k8sutil-kvstore
core: add context parameter to k8sutil kvstore
2021-12-13 11:44:58 +01:00
Sébastien Han 97b41eacdc Merge pull request #9391 from y1r/add-context-k8sutil-pvc
core: add context parameter to k8sutil pvc
2021-12-13 10:07:11 +01:00
Sébastien Han 9d345cafdf Merge pull request #9392 from y1r/add-context-k8sutil-prometheus
core: add context parameter to k8sutil prometheus
2021-12-13 10:06:09 +01:00
Sébastien Han ba8c6e061f Merge pull request #9394 from y1r/add-context-k8sutil-configmap
core: add context parameter to k8sutil configMap
2021-12-13 10:05:31 +01:00
Sébastien Han 870114fc91 Merge pull request #9393 from y1r/add-context-k8sutil-endpoint
core: add context parameter to k8sutil endpoint
2021-12-13 10:04:19 +01:00
Sébastien Han 0ffb22faa3 Merge pull request #9396 from y1r/add-context-k8sutil-service
core: add context parameter to k8sutil service
2021-12-13 10:03:37 +01:00
Yuichiro Ueno b6ce262e7f core: add context to k8sutil replicaset and secret
This commit adds context parameter to k8sutil replicaset and secret
functions. By this, we can handle cancellation during API call of
replicaset and secret resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:42:31 +09:00
Yuichiro Ueno 03e976b52c core: add context parameter to k8sutil service
This commit adds context parameter to k8sutil service functions. By
this, we can handle cancellation during API call of service resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:40:28 +09:00
Yuichiro Ueno 5352cf58a7 core: add context parameter to k8sutil pvc
This commit adds context parameter to k8sutil pvc functions. By this, we
can handle cancellation during API call of pvc resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:32:46 +09:00
Yuichiro Ueno c6c8dca0a7 core: add context parameter to k8sutil prometheus
This commit adds context parameter to k8sutil prometheus functions. By
this, we can handle cancellation during API call of prometheus resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:29:24 +09:00
Yuichiro Ueno d1d252c5c2 core: add context parameter to k8sutil endpoint
This commit adds context parameter to k8sutil endpoint functions. By
this, we can handle cancellation during API call of endpoint resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:26:21 +09:00
Yuichiro Ueno 25f784194d core: add context parameter to k8sutil configMap
This commit adds context parameter to k8sutil configMap functions. By
this, we can handle cancellation during API call of configMap resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:21:55 +09:00
Yuichiro Ueno 0d8c581aa9 core: add context parameter to k8sutil kvstore
This commit adds context parameter to k8sutil kvstore functions. By
this, we can handle cancellation during API call of kvstore resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-12-11 11:17:12 +09:00
Sébastien Han 1f7536ffab osd: cleanup cluster using the root UID
We need to use the root UID to run the cleanup job since ceph-volume
does not support running as non-root in all the versions. We have this
ceph tracker to allow this https://tracker.ceph.com/issues/53511 but
it's not in all ceph's versions. Implementing a version check is tricky
since at this stage the cluster is being deleted and it's hard to catch
it.

Closes: https://github.com/rook/rook/issues/9375
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-10 10:14:15 +01:00
Blaine Gardner aaecc93315 nfs: remove poolConfig
Remove the poolConfig in CephNFS to prevent different CephNFS CRs from
contending to change the replication spec of the default NFS pool.

Resolves #9355

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-08 13:56:28 -07:00
Blaine Gardner a99f8985b0 Merge pull request #9150 from yuvalif/ceph-notifications-refactor
ceph: bucket notifications refactoring work
2021-12-08 11:30:15 -07:00
Sébastien Han e5ce6abac0 core: continue and create an initial cluster info or fail
Let's catch the correct error when no cluster info exists yet. If we
have another error, we fail the orchestration and try again. This could
help up catching small API hiccups for example.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-08 17:31:44 +01:00
Sébastien Han 4f1a2d47a4 core: fix error message
Let's have a more accurate and correct error message that reflects what
the failing function tried to do.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-08 17:30:49 +01:00
Sébastien Han fdd243d3de core: always return nil on error
We should always return a nil pointer of clusterInfo if
CreateOrLoadClusterInfo() returns an error.

Closes: https://github.com/rook/rook/issues/9314
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-08 17:30:07 +01:00