Commit Graph
3432 Commits
Author SHA1 Message Date
Denis Egorenko eb036bfcb3 mgr: fix label selector when updating mgr active label
Fix label selector for watch-active mgr container: during update active mgr label,
add missed app=rook-ceph-mgr label, to avoid setting label for mon pod.

Resolves: #15208
Signed-off-by: Denis Egorenko degorenko@mirantis.com
(cherry picked from commit 009a0d9f6f)
2024-12-20 17:28:40 +00:00
Blaine Gardner 97da6d1414 Revert "object: create cosi user for each object store"
This reverts commit a941b3c33f.

Stop creating the 'cosi' user in the CephObjectStore reconcile. This
step often fails for some amount of time during initial object store
creation, causing frequent user concern. It has also been the source of
some reported failures that would otherwise be non-breaking for certain
users.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit fc08e87d44)
2024-12-11 15:18:01 -07:00
Tobias Wolf 9610407d89 file: add support for named mds metadata pool names
This commit adds optional support to specify the MDS metadata pool name. It defaults to `<fsName>-metadata` as current implementation expects but allows customization if needed e.g. if exisiting naming conventions used `<fsName>_metadata`. Additionally an "preservePoolNames" boolean has been added to indicate that no generated pool names should be used.

Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
(cherry picked from commit 675678fad6)
2024-12-09 14:23:46 -07:00
Travis Nielsen fdc8d66f88 Merge pull request #15059 from rook/mergify/bp/release-1.15/pr-15058
csi: update to latest cephcsi release (backport #15058)
2024-12-05 23:36:36 -07:00
parth-gr 67b2cee921 osd: fix osd resources per device class
GetOSDResources method was populating
wrong device class to get the osd
resources
This fix will fix the deviceClass label
for the GetOSDResources function

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 50d6d6ab5f)
2024-12-05 23:21:32 +00:00
parth-gr a2a92b7c4d osd: add a new devicetype label for osds
currently device class and device type
labels were clubbed with eachother
create a seperate label, as these two labels
can be seperate

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 01456e8683)
2024-12-05 23:21:32 +00:00
Madhu Rajanna 009f949d71 csi: update to latest cephcsi release
cephcsi fixed a bug related to data loss
and its fixed in 3.12.3 release, This commit
updates the cephcsi to 3.12.3 release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit e599ef67ef)
2024-11-25 12:19:19 -07:00
Travis Nielsen 2eaf5a8087 test: wait for mon daemons rather than mon canaries
The mon canaries may be created even when the mon daemons
are not created thereafter during the integration tests.
Therefore, the integration tests need to also query a label
specific to the mon daemon so the canaries are not a distraction
to the test.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b52ba6baca)
2024-11-22 17:38:46 +00:00
Artem Torubarov d231a3abda rgw: fix shared pools for zone
Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit 418d6e07e4)
2024-11-21 21:21:30 +00:00
Travis Nielsen f13aedaaee Merge pull request #15024 from rook/mergify/bp/release-1.15/pr-15016
rook: add warning when duplicate node topology values are detected (backport #15016)
2024-11-20 10:07:36 -07:00
Michael Adam c7ea87ca92 core: apply RevisionHistoryLimit to csi
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit a0fb9aa507)

# Conflicts:
#	pkg/operator/ceph/csi/spec.go
2024-11-19 13:55:23 -07:00
Michael Adam 687a7d9898 core: propagate RevisionHistoryLimit to crashcollector
still incomplete.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit a530101147)
2024-11-19 20:14:03 +00:00
Michael Adam a21f542fec core: fix the revisionHistoryLimit implementation and test
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 70d4f5d4b7)
2024-11-19 20:14:03 +00:00
Fred Heinecke a1ba4155f8 osd: add warning when duplicate node topology values are detected
When node topology labels with duplicate values are detected, rook silently discards all but one label.
This adds a warning informing administrators of this, allowing for easier identification of labeling issues.

Signed-off-by: Fred Heinecke <fred.heinecke@yahoo.com>
(cherry picked from commit f54ecaaff1)
2024-11-18 18:52:38 +00:00
Peter Razumovsky 7a29055e36 osd: add osd auth recovery from file canary job test
Add test to canary-integration-test scenarios which removes
osd auth and then recovers it on osd activation from keyring
file.

Resolves: #14825
Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
(cherry picked from commit 12613bc2fa)
2024-11-15 22:14:49 -07:00
Peter Razumovsky f3a714399c osd: remove excess if-else for keyring file import in activate script
Remove unnecessary if-else statement inside "if keyring file exists"
condition of osd activate script.

Resolves: #14825
Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
(cherry picked from commit 62ffcd4cbe)
2024-11-16 05:06:44 +00:00
Peter Razumovsky 5ec687cee1 osd: import keyring file on activate to ceph auth if not imported yet
If host path keyring file exists and created during osd-prepare but not
imported to ceph auth then rook-ceph-osd activate init container will
create new keyring in ceph auth by ceph auth get-or-create command. To
avoid keyrings difference in host path and in ceph auth, consider
importing key from host path keyring file if no keyring found in ceph
auth.

Resolves: #14825
Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
(cherry picked from commit 6eb2d1121a)

# Conflicts:
#	pkg/operator/ceph/cluster/osd/spec.go
2024-11-16 05:06:44 +00:00
Grant Fleming 171a45e006 operator: monitors should always be allowed to failover
Previously arbiter monitors were allowed to failover in supported versions
of Ceph. This behaviour regressed. Since all supported versions of Ceph now
support this, we no longer need to check this at all.

Signed-off-by: Grant Fleming <gfleming@evroc.com>
(cherry picked from commit cdf692d227)
2024-11-08 16:23:52 +00:00
Artem Torubarov f7613e2643 rgw: keep default-placement in zone config
Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit 8ad2bf88bb)
2024-11-05 17:55:25 +00:00
Artem Torubarov 6694d88e67 rgw: support custom name for default pool placement
introduce Default flag to CRD

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit b47dff9770)
2024-11-05 16:23:06 +00:00
Travis Nielsen f33731d8b8 Merge pull request #14931 from rook/mergify/bp/release-1.15/pr-14715
rgw: support new zone pools (backport #14715)
2024-11-05 09:20:54 -07:00
Travis Nielsen 84e3e2f18f Merge pull request #14953 from rook/mergify/bp/release-1.15/pr-14949
osd: Allow scheduling on unschedulable nodes (backport #14949)
2024-11-04 17:51:05 -07:00
Travis Nielsen 5ecef3010f Merge pull request #14960 from rook/mergify/bp/release-1.15/pr-14941
core: Set resources on the detect version job (backport #14941)
2024-11-04 13:28:25 -07:00
Travis Nielsen e51ac39b78 mds: wait for mds standby upgrade for same fs
The upgrade of the mds daemons pauses to wait for the
stopping of standby daemons before the filesystem upgrade
is completed. If there are multiple filesystems, there
could be standbys for other filesystems that will not be
stopped at the time of the upgrade of another filesystem.
Thus, the standbys may not upgrade and be stuck on the
previous version. Now, the standby upgrade will only wait
for standbys for the same filesystem.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 99d60c5bba)
2024-11-04 17:41:01 +00:00
Travis Nielsen 86af6cb0ba core: set resources on the cmd reporter jobs
If the cmd-reporter key is set under the resources
element in the CephCluster CR, the memory and cpu request
and limits will be set on the ceph detect version job
and network job accordingly.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit f489f99e13)
2024-11-04 17:15:32 +00:00
Travis Nielsen 52b4a61a72 osd: allow scheduling on unschedulable nodes
For nodes that are explicitly requested for deploying
OSDs, they will be skipped temporarily if not
schedulable or not ready. A future reconcile is
expected to schedule them. Allow the OSDs to be
scheduled even on these nodes that are temporarily
down, even if it blocks the reconcile from completing.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 7fbe4e7db5)
2024-11-01 20:19:18 +00:00
Travis Nielsen 9fd6e308e7 csi: remove version check for k8s and cephcsi
The version checks for the csi driver are removed now
since they are all obsolete. The K8s version and cephcsi
versions are no longer checked. Anyway, the move to the
csi operator would take ownership of version checks
needed in the future, so for now we simplify rook
deployment of the csi driver.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 2ff429e479)
2024-10-31 07:47:27 -06:00
Artem Torubarov 0f0f03918a rgw: support v19 zone pools
add rgw shared pools rados ns to topics_pool, account_pool, and group_pool

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit f6a25b0c4b)
2024-10-29 15:43:11 +00:00
Artem Torubarov 3712566c9b rgw: pool placement
Signed-off-by: Artem Torubarov <torubarov.a.a@gmail.com>
(cherry picked from commit 59175f0b40)
2024-10-29 08:37:58 -06:00
Travis Nielsen d117b52783 Merge pull request #14905 from rook/mergify/bp/release-1.15/pr-14818
kms: key rotation support for vault kms (backport #14818)
2024-10-25 14:45:50 -06:00
Blaine Gardner c781db7c03 object: also use system certs for validating RGW cert
When generating the HTTP client used for RGW admin ops, use both system
certs as well as the user-given cert.

As a real world example, admins may use ACME to rotate Letsencrypt certs
every 2 months. For an external CephObjectStore, the cert used by Rook
and RGW may not be rotated at the same time. This can cause the Rook
operator to fail CephObjectStore reconciliation until both certs agree.

When Rook also relies on system certs in the container, Rook's
reconciliation will not have reconciliation failures because
Letsencrypt's well-known and trusted root certificates can be loaded
from the system to validate the RGW's newly-rotated cert.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 7bb72a0171)
2024-10-25 17:59:00 +00:00
Guillaume Abrioux aa8af31a7f osd: mount /run/udev in the init container for ceph-volume activate
The /run/udev directory is now mounted in the OSD init container. This change
is necessary because `ceph-volume activate` needs access to /run/udev [1] in order
to properly handle devices. Without this mount, `ceph-volume activate` could
fail to discover devices during OSD initialization.

[1] https://github.com/ceph/ceph/commit/c2e8c295dc46f1bd74861feb163d9d82f8bb5509

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit dbcd0d46dd)
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2024-10-25 10:03:21 +00:00
Praveen M a467f57350 security: key rotation support for vault kms
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit d8c0242c29)
2024-10-24 17:39:18 +00:00
Madhu Rajanna 7cabfd056f core: cleanup blockpool with annotation
This is similar to #14052 we did for radosnamespace
and this is an extension to support cleanup
at the blockpool level to cleanup the images
and the snapshots in a pool.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 4e29717317)
2024-10-24 16:29:20 +00:00
Joshua Hoblitt 241a68c21d object: set obc user quota(s) in one SetUserQuota() call
Previously, up to 3 calls to SetUserQuota() could be made. This has been
consolidated into a single call. Additionally, the `addtionalConfigSpec`
struct is introduced to centralize handling of `.spec.additionalConfig`
keys and as foundational work to support new keys in the future.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9243764359)
2024-10-21 14:53:17 +00:00
Peter Razumovsky c55756cf73 core: define empty securityContext for pods to fix CIS 5.7.3
Resolves CIS benchmark rule 5.7.3, Pods part. SecurityContext
should be explicitly defined in pod level of Pod spec section.
It is sufficient to specify empty securityContext to satisfy
CIS 5.7.3 rule.

5.7.3 Apply Security Context to Your Pods and Containers

When designing your containers and pods, make sure
that you configure the security context for your pods,
containers, and volumes.

Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
(cherry picked from commit 516eab4d8a)
2024-10-17 17:47:21 +00:00
Santosh Pillai f43e088fda core: fix deletion of the osd-replace-config cm
MustDelete DeleteOption was set to `true` when deleting
osd-repalce-config configMap.  This cm won't existing after
all the OSDs get migrated. So deletion of the non-existent
cm will result in error. This PR removes `mustDelete: true` from
the DeletionOption when deleting osd-replace-config configmap

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 8dd237b460)
2024-10-16 13:50:55 +00:00
Travis Nielsen a4aea241b5 core: skip counting exporter pods as a ceph pod
The exporter pods were being counted as a ceph pod,
so once an exporter pod was added to a node, it would never
be removed since the controller thinks the exporter pod
itself is a ceph pod for which the exporter must be present.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit a71078b733)
2024-10-15 16:10:38 +00:00
Madhu Rajanna 34f81ec820 csi: disable fencing in Rook
Disabling the RBD and CephFS fencing
in Rook for now as its having bugs where
Rook is blocklisting wrong IP address
due to timing issues.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 1d1ed5e962)
2024-10-11 16:27:09 +00:00
Travis Nielsen b8ea67f56e mon: do not remove extra mon in middle of failover
If the mon failover is in progress, ensure the removal
of an extra mon deployment is skipped since that code
path only has one mon in the list for the mon that was
just newly started. The extra mon was erroneously removing
a random mon in that case, followed immediately by the mon
failover completing and removing the expected failed mon,
and potentially causing mon quroum loss.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit e2cadab6fe)
2024-10-07 13:27:56 +00:00
Blaine Gardner 07884a3028 mds: fix liveness probe timeout
When the MDS liveness probe times out, it should not fail the probe. If
the cluster has a network partition or other issue that causes the Ceph
mon cluster to become unstable, `ceph ...` commands can hang and cause
a timeout. In this case, the MDS should not be restarted so as to not
cause cascading cluster disruption.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit ad1bae9e1b)
2024-10-07 06:18:54 +00:00
Joshua Hoblitt 89a3eb5542 rgw: fix cephObjectStore failing with pre-existing pools
When attempting to use pre-existing (or cephBlockPool managed) pools and
the cephObjectStore.spec.{metadataPool,dataPool} fields are not
specified, rgw creation will fail with this error:

    2024-09-25 21:00:17.744358 E | ceph-object-controller: failed to reconcile CephObjectStore "rook-ceph/test1". failed to create object store deployments: failed to create object pools: failed to create metadata pools: failed to create pool "test1.rgw.control": pool "test1.rgw.control" type is not defined as replicated or erasure coded

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9b952e0a55)
2024-10-03 17:51:30 +00:00
Michael Adam d60966a626 core: add ROOK_REVISION_HISTORY_LIMIT operator setting
This adds an operator config setting ROOK_REVISION_HISTORY_LIMIT
defaulting to kubernetes'value for RevisionHistoryLimit.

If configured, the provided value will be used as RevisionHistoryLimit

for all Deployments rook creates.

Fixes: #12722

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit ab8fd90aa6)
2024-10-02 20:11:54 +00:00
mergify[bot] d815286186 Merge pull request #14788 from rook/mergify/bp/release-1.15/pr-14755
core: preserve pool application name change (backport #14755)
2024-10-01 17:28:33 +00:00
Santosh Pillai 771c165e69 core: preserve pool application name change
default application name is updated inside the `CreatePool` method. Send
pool spec as address in order to preserve this change.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 1a95d6f533)
2024-10-01 17:01:44 +00:00
parth-gr a65087b00b csi: add sc privileged to logrotate sidecar container
deployments on openshift where we need csi container pods
to be run on privileged, the logrotate sidecar container was missing the
privileged permission letting, side car to not run properly

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 21ca333ed7)
2024-10-01 15:56:18 +00:00
parth-gr 448f89c48c csi: fix the disable driver flag in the csi driver reconcile
ROOK_CSI_DISABLE_DRIVER was not working accurate
from https://github.com/rook/rook/pull/14489
The csi driver was installed even if its not
expected

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 166e4f35b2)
2024-09-23 16:20:57 +00:00
Travis Nielsen 8c64dec248 core: enable annotations on crash collector
The crash collector daemon had missed the ability to
add custom annotations via the cephcluster CR, as already
supported for all the other daemons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit fa2941d098)
2024-09-19 17:49:17 +00:00
Artem Torubarov 362cf539eb exporter: move config to cluster CRD
allows to set prio-limit and stats-period options to ceph exporter

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
(cherry picked from commit b2c39ace25)
2024-09-18 20:16:36 +00:00
Travis Nielsen 1a1daf6bff Merge pull request #14707 from rook/mergify/bp/release-1.15/pr-14693
csi: stop deleting csi-operator resources (backport #14693)
2024-09-09 12:19:15 -06:00