Commit Graph
3750 Commits
Author SHA1 Message Date
Travis Nielsen a3df18d58b Merge pull request #16410 from rook/mergify/bp/release-1.18/pr-16382
csi: add watcher for cm cluster controller (backport #16382)
2025-08-29 10:07:00 -06:00
subhamkrai 6339c574c7 csi: delete csi operator CR's when disabled
this commit deletes csi operator CR's when
user wants to revert back to csi driver for
some reasons. This commits deletes CR's like
`clientProfile, cephConnection, driver,
operatorConfig, and clientProfileMapping`.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 3b7a7b8958)
2025-08-29 14:32:48 +00:00
subhamkrai 8ff513e8ae csi: add watcher for cm cluster controller
this commit add watcher for cm `rook-ceph-operator-config`
to look for updated value of `ROOK_USE_CSI_OPERATOR` before
adding this watcher we had to restart rook operator pod
so that it reconciles and create cephConnection CR.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit dd6693ff97)
2025-08-29 14:24:43 +00:00
Travis Nielsen 7c2347b30c csi: cleanup formatting of csi log statement
The csi key creation was not correctly logging params

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 0a9262e73b)
2025-08-29 07:58:35 +00:00
Travis Nielsen 904881bd74 csi: set csi operator as default if no settings found
If the ROOK_USE_CSI_OPERATOR setting is not found in the
rook-ceph-operator-config configmap, the default now
is to use the csi operator instead of the previous
csi driver

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b2b28e1280)
2025-08-29 07:58:35 +00:00
Travis Nielsen 2c3543a292 csi: default to secure kernel mount options if network encrypted
If the network is encrypted with msgr2, cephfs requires
the mount options to include ms_mode=secure. Now this
will be set by default if the mount options are not
already set in the cephcluster CR or the operator env
var CSI_CEPHFS_KERNEL_MOUNT_OPTIONS.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 6309cd367e)
2025-08-28 16:28:06 +00:00
Travis Nielsen ea8270fd82 csi: set kernel mount options from env var if not in cluster spec
If the cephfs kernel mount options are not specified in the
cephcluster.spec.csi CR settings, fall back to the setting
in the operator env var CSI_CEPHFS_KERNEL_MOUNT_OPTIONS.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit eeebfbf496)
2025-08-28 16:28:06 +00:00
Travis Nielsen e7d0cfdfa0 csi: update client profile when changing
The csi client profile CR needed to be updated if
the spec changed. Previously, the client profile was never
being updated because it was calling Update() on the
existing CR retreived from Get(), rather than with
the updated spec.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit cc39368964)
2025-08-28 16:28:06 +00:00
Blaine Gardner 1872784128 csi: fix wrong use of daemon config for cephx status
Fix a wrong usage of the CephX daemon config that should be CephX CSI
config.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 480b407bc2)
2025-08-27 21:15:27 +00:00
Travis Nielsen d25ae43bb6 csi: always initialize driver names
The driver names were only being initialized in certain code paths
where the drivers were being started and stopped. However, another
code path relied on those names being set. Now, we initialize the
driver names every time the CSI params are initialized, instead of
initializing the names separately.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit af548ef2f6)
2025-08-27 17:48:19 +00:00
Travis Nielsen 3a4b81250a csi: generate default crush topology labels
The csi read affinity requires the crush topology labels
to be specified in the cephconnection CR. If they are
not specified by the user, rook can generate the default
topology labels instead of expecting them.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 79e067ec05)
2025-08-26 08:06:41 +00:00
parth-gr 2844fcf9b0 csi: fix the prior key count for csi key rotation
fix the prior key count status for the csi
key rotation

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 7b5d476887)
2025-08-20 16:08:29 +00:00
Blaine Gardner af70853894 core: allow cephx rotation for ceph 19.2.3 except mons
Allow Rook to rotate CephX keys for Ceph v19.2.3 and up with the
exception of Ceph mons. While v19.2.3 has the `ceph auth rotate` command
that Rook needs to perform key rotation, there is still ongoing work in
Ceph to change how the `mon.` key is tracked internally. Rook's mon key
rotation requires those currently-unreleased Ceph changes.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit a952b7511a)
2025-08-19 20:56:15 +00:00
Blaine Gardner 0241a57f05 core: finalize CephCluster CephX status handling
Cleanup up overall usage of CephX statuses in CephCluster.

Convert all CephX statuses to non-pointer types. There is no specific
need for pointer types, and keeping these as non-pointers means there is
not a risk of nil pointer exceptions in all the various Rook controllers
for upgraded clusters.

Move initialization of CephCluster CephX status items to
`preMonStartupActions()`. This helps resolve 2 issues:

1. 'Uninitialized' state was being set for external CephClusters where
   CephX statuses are not relevant.
2. 'Uninitialized' state was being set for upgraded clusters whose key
   status cannot be determined.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 2fd9c9a88c)
2025-08-19 20:56:15 +00:00
Travis Nielsen d9039a009c Merge pull request #16353 from rook/mergify/bp/release-1.18/pr-16352
csi: update ceph-csi to v3.15.0 (backport #16352)
2025-08-19 12:41:55 -06:00
Praveen M 87331abe01 csi: update ceph-csi to v3.15.0
We have new release for Ceph-CSI v3.15.0 -
https://github.com/ceph/ceph-csi/releases/tag/v3.15.0

Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 5fc4e15bb1)
2025-08-19 17:31:02 +00:00
subhamkrai 6b57857f1c ci: run csi-operator only in canary and upgrade suite
this commit add check to only run the csi-operator in
all the canary tests and upgrade suite only, other suite
like smoke and object will still test csi-driver.

Also, adding changes to make CI happy.

Signed-off-by: subhamkrai <srai@redhat.com>
Co-Authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit c57a47f774)
2025-08-19 13:31:45 +00:00
Santosh Pillai 4e28392642 core: rotate fs mirror daemon cephx key
Rotate fs mirror daemon cephx keys based on the cephXconfig in the
cephcluster spec and also update the fs mirror status with the latest
cephxStatus

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 8df6b8d0d0)
2025-08-18 21:18:31 +00:00
Denis Egorenko f21cd80606 pool: fix cephblockpool remove when related pool is already removed from cluster
When removeing CephBlockPool check first that related ceph pool is exist in cluster,
since it may be manually removed by mistake.

Related-Issue: #16328
Signed-off-by: Denis Egorenko <degorenko@mirantis.com>
(cherry picked from commit c9e0f89a8b)
2025-08-15 19:46:18 +00:00
Blaine Gardner 8dc0af17b7 Merge pull request #16332 from rook/mergify/bp/release-1.18/pr-16176
mon: rotate cephx key (backport #16176)
2025-08-15 13:05:47 -06:00
Santosh Pillai bfe8d50db6 mon: rotate keys
rotate mon daemon keys and update the cephx status for mons in the
cephcluster resource.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit fe42fe102f)
2025-08-15 17:07:19 +00:00
Madhu Rajanna a783abbac1 core: implement client name override
There is a field in the CR spec to override
the name and the feature was not implement,
This commits adds the support to override the
cephclient name if ever required.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a71cc27b72)
2025-08-15 16:55:16 +00:00
Madhu Rajanna 3d1afc7788 core: skip Name validation
the CR cannot be created without a Name,
Removing the check as it never gets executed.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 36c84aa43c)
2025-08-15 16:55:16 +00:00
Travis Nielsen cbd9ab8c4e Merge pull request #16307 from rook/mergify/bp/release-1.18/pr-16290
rbdmirror: fix status check for rbd rn mirroring (backport #16290)
2025-08-14 09:09:48 -06:00
Travis Nielsen 861068122d Merge pull request #16308 from rook/mergify/bp/release-1.18/pr-16304
csi: update the csi-operator API (backport #16304)
2025-08-14 09:09:25 -06:00
Travis Nielsen a147675c48 Merge pull request #16310 from rook/mergify/bp/release-1.18/pr-16309
csi: remove inline panic handler from CreateDefaultClientProfile (backport #16309)
2025-08-14 09:08:26 -06:00
Denis Egorenko 6b27d08221 operator: mount udev to cleanup job and disable udev sync
Mount /run/udev inside cluster cleanup jobs and disable udev sync
with DM_DISABLE_UDEV.

Related-Issue: rook#16292
Signed-off-by: Denis Egorenko <degorenko@mirantis.com>
(cherry picked from commit 09622a8b8d)
2025-08-14 13:10:47 +00:00
Oded Viner 6157ff570d csi: remove inline panic handler from CreateDefaultClientProfile
remove inline defer that catches and logs panics since it is already handled by pr#16150

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 7f0be04773)
2025-08-13 16:28:58 +00:00
Madhu Rajanna 1938299fc9 csi: update the csi-operator API
updating the csi operator API version
to latest version.

Adding the cephFS and RBD controllerPublish
secret that are required for the fencing
operation that is supported by ceph-csi
with csi-operator.

Updated the storageclass to include the
secrets incase if user wants to override
the defaults in the clientProfile for
new PVC's.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 3d024ce3c7)
2025-08-13 15:08:12 +00:00
parth-gr b078effaec rbdmirror: fix status check for rbd rn mirroring
if the blockpool mirroring is disabled and status check
is not removed, currently rn cr still watches for the status

Add a check if the pool or rados mirroring is disabled then dont
watch for status

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 11b3d7e16e)
2025-08-13 14:16:57 +00:00
mergify[bot] 11cb14b2df Merge pull request #16301 from rook/mergify/bp/release-1.18/pr-16294
csi: update Kubernetes CSI-Addons sidecar to version 0.13.0 (backport #16294)
2025-08-12 17:55:21 +00:00
Niels de Vos a6da360d15 csi: update Kubernetes CSI-Addons sidecar to version 0.13.0
Signed-off-by: Niels de Vos <ndevos@ibm.com>
(cherry picked from commit 17d53ed16b)
2025-08-12 17:27:47 +00:00
Madhu Rajanna 788cf7b212 csi: update cephfs user and key in secret
cephCSI already deprecated the adminID and
adminKey keys in the secrets and to be backward
compatible it still supports the adminID and
adminKey but it logs the warning, updating the
secrets created by Rook to use userID and userKey
instead of adminID and adminKey.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit cb89f351ed)
2025-08-12 16:29:27 +00:00
mergify[bot] c698ab260b Merge pull request #16273 from rook/mergify/bp/release-1.18/pr-16269
csi: Create cephconnection CR with name of the cluster namespace (backport #16269)
2025-08-12 07:06:04 +00:00
Santosh Pillai 519ec6821c core: rotate rbd mirror peer key
rotate the client.rbd-mirror-peer key based on the cephxconfig.
Also update the cephxStatus in the cephcluster as well as the
mirrored cephblockpool.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit ee0b137d75)
2025-08-11 16:55:09 +00:00
Madhu Rajanna 41c4e24e35 csi: use cluster namespace for cephConn
CephConnection CR is created with the
kubernetes namespace name as its the
unique name in the entire cluster.
This PR removes unwanted input
parameters and adjust the namespace
name for the cephConnection CR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 1ff3f07ac5)
2025-08-11 07:12:44 +00:00
Santosh Pillai c78c66f7e6 core: rotate mirror daemon keys
rotate RBD mirror daemon keys, add secret resource version to the mirror
deployment and update the mirror resource status after the key is
rotated

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit d0fbf6c424)
2025-08-08 15:46:23 +00:00
Travis Nielsen dac320bc20 csi: create cephconnection cr with cluster namespace name
The cephconnection CR expects to be created with the name of
the namespace where the cephcluster CR is found, so the CSI
driver can find the cluster when provisioning the volume.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 134e27e353)
2025-08-08 15:08:11 +00:00
mergify[bot] f17e7e979e Merge pull request #16268 from rook/mergify/bp/release-1.18/pr-16249
mon: Failover mon immediately if node not exist (backport #16249)
2025-08-07 18:13:41 +00:00
Travis Nielsen 66b3e42e03 mon: failover mon immediately if node not exist
During mon failover, if a mon is assigned to a node
but the node does not exist, the mon should be failed
over immediately instead of waiting for a 10 or 20
minute timeout. If the node does not exist, the mon pod
will be in a pending state until the failover is finally
triggered, and no point in waiting that long if the
node is gone.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 8b4d3b19cf)
2025-08-07 16:41:14 +00:00
Oded Viner 40a3f704a3 object: mark realm as default to avoid zone creation
add defaultRealm field to cephobjectstore to allow rook to mark the
created realm as default. this prevents ceph from auto-creating a
"default" zonegroup and zone when the default is not explicitly set.
affects only non-multisite setups.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 182cd211ca)
2025-08-07 16:34:15 +00:00
CL0Pinette d3285df792 csi: add CrossNamespaceVolumeDataSource feature gate
This enables configuring the CrossNamespaceVolumeDataSource feature gate

Signed-off-by: CL0Pinette <me@cl0pinette.fr>
(cherry picked from commit b63c222d17)
2025-08-07 15:01:30 +00:00
Oded Viner 13faad2269 osd: validate node topology to prevent invalid crush map hierarchy
add a validation check to fail osd deployment when topology labels
like rack or chassis are duplicated across parent domains
(e.g., zones). this prevents invalid crush map hierarchies
(dfbugs-2610).

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 973f8a3a35)
2025-08-05 13:58:38 +00:00
Joshua Hoblitt 31d20c7c27 object: simplify CephObjectStoreUser deletion logic
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 1163133aec)
2025-08-04 18:15:21 +00:00
Joshua Hoblitt fc392248c6 object: simplify obc storageclass lookup
obc was using an internal exponential backup for the lookup of the sc.
This is somewhat of an anti-pattern when using controller-runtime as it
implements retrying logic. If the sc doesn't exist, the reconcile
attempt should fail immediately and controller-runtime will handle the
back-off policy.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 80da084732)
2025-08-04 15:06:41 +00:00
Joshua Hoblitt 7b65e17599 object: fix bucket policy in sync detection
A typo was causing the operator to attempt to sync bucket policy when
the state was already in sync. This resulted in the operator carrying
out unnecessary work and logging activity with no user visible change
resulting.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit fbc60608ed)
2025-08-01 19:27:10 +00:00
mergify[bot] 60ffd2991e Merge pull request #16218 from rook/mergify/bp/release-1.18/pr-16210
exporter: automate rotate exporter cephx keys (backport #16210)
2025-08-01 17:20:35 +00:00
parth-gr 3df15cacef exporter: automate rotate exporter cephx keys
rotate cephx keys based on keyRotationPolicy
and update cephxStatus for the ceph exporter daemon pods.

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 9ec7a767c3)
2025-08-01 16:11:14 +00:00
Blaine Gardner 55de1bcb38 osd: implement automated cephx key rotation for osds
Implement automated CephX key rotation for OSDs.

OSDs have marshalled CephX statuses applied as an annotation on the OSD
pod spec, which differs from other Rook Ceph daemons for a two reasons:

A large cluster could have hundreds or thousands of OSDs, so it is more
critical that Rook avoid rotating OSD keys more than once in the event a
CephCluster reconcile restarts partway through OSD creation/updation.

OSDs do not have their CephX keys stored in K8s Secrets, whose resource
version is used for enforcing the desired restart behavior other daemon
pods like RGWs.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 4189a196c1)
2025-08-01 16:09:14 +00:00
Santosh Pillai fd2b4333e8 Merge pull request #16171 from parth-gr/cephx-crashcollector
core: automate rotate crashcollector  cephx keys
2025-07-31 13:41:13 +05:30