Commit Graph
3772 Commits
Author SHA1 Message Date
parth-gr 225121879f rbdmirror: fix mirroring monitoring settings for rn
currently if we disable the monitoring for rn,
it doesnt reset the status

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 49c26dbfb0)
2025-09-26 19:49:06 +00:00
subham rai a2054ef9c9 Merge pull request #16525 from rook/mergify/bp/release-1.18/pr-16499
object: add status.{phase,observedGeneration} to cephbn (backport #16499)
2025-09-23 12:55:34 +05:30
Madhu Rajanna ae0dc30ccc csi: use recreate deployment strategy
This is a fix/workaround to set the Recreate
deployment strategy as default in Rook as
its long proven working without any problem.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 333082c397)
2025-09-23 05:19:16 +00:00
Madhu Rajanna 083cb37e34 csi: remove liveness from the driver spec
CephCSI will remove the livess sidecar
container functionality as it was created
very long back and it should be replaced with
kubernetes GRPC livessness problem.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 46c7d2cc26)
2025-09-23 05:19:15 +00:00
Joshua Hoblitt 628fc97e88 object: add status.{phase,observedGeneration} to cephbn
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 864c349c1f)
2025-09-22 22:27:16 +00:00
subhamkrai 1477f60e10 csi: add labels to the csi-operator driver pod
currently, labels are not passed to csi-operator but
for csi-driver lables works as expected. This commit
add changes to add labels on csi-operator driver pod as well.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 0c296545a5)
2025-09-22 14:40:42 +00:00
Santosh Pillai 3e0514b947 osd: updated blocking pdbs if drained node is back
If the drained node is added back and one or more others nodes are down
update the blocking pdbs, that is, add blocking pdb to node that was
just added back.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit f2bf0eb200)
2025-09-18 17:10:32 +00:00
Santosh Pillai 96d03cb1e4 core: use updated context in prevalidaiton checks
If the CephCluster spec is updated before the prevalidation check, then
Cluster.context still refers to the cancelled context of the operator.
This PR just updates the cluster context to use the latest operator
context.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 1ff7604f82)
2025-09-16 15:53:11 +00:00
parth-gr 0249d2b6a5 external: fix ipv6 monitoring endpoint reconcile
currently the extraction ipv6 was not correct
used the net package to extract the host ip from
the ipadress

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit e1873cb2e7)
2025-09-15 16:46:41 +00:00
Santosh Pillai 508658f797 mon: fix mon health nil pointer exception
shouldFailoverMonImmediately has a nil pointer exception with mons on
PVC. Rook-ceph-mon-endpoint does not store node information of the mons
on PVC. So `mapping.Hostname` throws nill pointer

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit d399615bdc)
2025-09-15 14:00:10 +00:00
Elias Carter 4c31c51ddb osd: exclude down OSDs from main PDB when cluster is clean
Currently, when there are down OSDs but all PGs are clean we add the
number of downed OSDs ot the main PDB maxUnavailable. For example if
OSDs 1,3,5 are down and all PGs are clean we create the following PDB:
```yaml
  maxUnavailable: 4
  selector:
    matchLabels:
      app: rook-ceph-osd
```

This is potentially dangerous as there can be race conditions which can
break the cluster, for example:
1. A new node is added to the cluster with 4 OSDs
2. Those OSDs are down as they have not started up and joined the cluster yet
3. All PGs are healthy as the new OSDs haven't started yet and they are new
4. The rook operator sets maxUnavailable to 5 on the OSD PDB
5. The new OSDs move from down to up as they start
6. Something in the cluster starts a disruption (eviction request)
7. Any 5 OSDs can be disrupted as maxUnavilable is still 5 and the downed OSDs are now up
8. If the 5 disrupted OSDs contain all the replicas of a PG it will cause the PG to go down

To better protect from this scenario, we can instead exclude the downed
OSDs from the main PDB instead of adding to maxUnavailable.
```yaml
  maxUnavailable: 1
  selector:
    matchExpressions:
    - key: app
      operator: In
      values: ["rook-ceph-osd"]
    - key: osd
      operator: NotIn
      values: ["1", "3", "5"]
```

This allows drains to still process when there are downed OSDs and PGs
are clean without allowing the non-downed OSDs to be disrupted.

Signed-off-by: Elias Carter <elias@dropbox.com>
(cherry picked from commit 60a15306e9)
2025-09-11 18:47:12 +00:00
subhamkrai 5b30ead7c1 nfs: rotate nfs cephx key
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 5e21d43365)
2025-09-11 16:44:12 +00:00
Travis Nielsen 8a8e1eddef csi: allow csi controller pod to set host networking
The ceph csi controller plugin did not have the capability to
set host networking, in case the host networking is being enforced
with ROOK_ENFORCE_HOST_NETWORK: true.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit e294c280ed)
2025-09-10 19:42:40 +00:00
Blaine Gardner c729d02dc7 Merge pull request #16460 from rook/mergify/bp/release-1.18/pr-16452
csi: fix prior cephx key deletion logic (backport #16452)
2025-09-10 10:48:51 -06:00
Blaine Gardner 9b71f192ed csi: fix prior cephx key deletion logic
Fix an issue where keepPriorKeyCountMax would be counted differently
when rotation was currently in progress, versus when rotation was not in
progress.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 7911469016)
2025-09-10 16:02:44 +00:00
subhamkrai 649489c504 csi: add multus network annotation to csi-operator
this commit adds multus network annotation to the
csi-operator node plugin and controller plugin pods
when multus is enabled in the ceph cluster.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit d2a1286606)
2025-09-10 15:57:40 +00:00
parth-gr 171cb589e2 osd: remove the osd bootstrap keyring
when the osd is created there is no need for
osd bootstrap keyring, so remove the keyring
and keyring file,

New keyring will be created if
new osd need to be provisoned

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 794a232835)
2025-09-04 15:43:38 +00:00
Blaine Gardner 393722d6ff Merge pull request #16424 from rook/mergify/bp/release-1.18/pr-16372
core: delete bootstrap keys (backport #16372)
2025-09-02 15:08:53 -06:00
Blaine Gardner d2d69da654 Merge pull request #16398 from rook/mergify/bp/release-1.18/pr-16271
core: rotate client.admin cephx key (backport #16271)
2025-09-02 15:08:42 -06:00
Santosh Pillai 76285baf24 core: delete bootstrap keys
Delete the client.boostrap.* keys. These keys are not created by rook so
it can't rotate them. This PR just delete these keys in the
postMonStartUpAction.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 4cdba0df54)
2025-09-02 18:17:44 +00:00
Santosh Pillai da12810130 osd: rotate lockbox keys for encrypted osd
ceph-volume creates osd-lockbox keys for the encryted osds. This PR
rotates those keys along with the OSD keys.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit b4e1c1720d)
2025-09-02 18:16:40 +00:00
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 14490a075e core: admin cephx key rotation
Implement CephX key rotation for Rook's client.admin user.

Admin user rotation is risky, so this has been tested extensively both
in unit tests as well as by manually injecting failures during runtime.
In testing, all failures were able to be recovered by the recovery
routine.

A mutex is also added to help ensure that two simultaneous admin key
rotation processes cannot be running simultaneously for any given
namespace. The mutex is tested in unit tests, and it was verified during
runtime via  manual testing.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 7c33186e72)
2025-08-27 21:21:29 +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