Commit Graph
899 Commits
Author SHA1 Message Date
subhamkrai 304cdc8c83 core: remove support for reef v18 in Rook v1.19
For Rook v1.19,removing support for Ceph Reef. It is at end of life.
Users on Reef can continue to use Rook v1.18.x or older.
The latest two Ceph versions Squid and Tentacle are supported.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-12-04 13:11:35 +05:30
Travis Nielsen f252bf68af Merge pull request #16713 from sp98/allow-snaptrim-wait-pg-for-PDBs
osd: support snaptrimp and snaptrip_wait pgs
2025-11-17 10:10:20 -07:00
Santosh Pillai c0eb34815f osd: support snaptrimp and snaptrip_wait pgs
If the ceph status is "active+lean+snaptrimp" or
"ative+clean+snatrip_wait" , the the PDB controller should treat this
ceph staus as healthy and don't block the node drain

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-11-14 11:07:06 +05:30
Travis Nielsen 9a79a48f9e Merge pull request #16661 from subhamkrai/fix-rns-race-condition
namespace: add retryOnConflict when updating status
2025-11-13 10:38:17 -07:00
huyejia a6239dedfe osd: replace Split in loops with more efficient SplitSeq
Signed-off-by: huyejia <huyejia@outlook.jp>
2025-11-12 16:52:12 +08:00
subhamkrai c8ee7305d4 namespace: add retryOnConflict when updating status
currently, in RNS crd while updating status we don't
have retryOnConflicts, similar to other CRD due to
this RNS status was not updated succesfully and to
fix this we have restart the rook operator pod.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-11-12 10:16:43 +05:30
Joshua Hoblitt 43f26534ed osd: add CephCluster.spec.storage.OSDMaxUpdatesInParallel
Configures the maximum number of OSDs to update in parallel.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-11-03 12:10:28 -07:00
Travis Nielsen 938380734d pool: skip setting the target size ratio to 0 by default
The target size ratio is currently always being set to 0, when
neither the legacy targetSizeRatio nor the parameter for
target_size_ratio are set. In this case, we should not set it to 0,
but rather should skip the command to set the target size ratio.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-10-15 11:58:36 -06:00
Travis Nielsen c069e73c91 Merge pull request #16520 from parth-gr/fix-rn-status
rbdmirror: fix mirroring monitoring settings for rn
2025-09-26 14:48:01 -05:00
parth-gr 49c26dbfb0 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>
2025-09-25 19:26:52 +05:30
Travis Nielsen 66ca9716b8 Merge pull request #16532 from Madhu-1/fix-16480
namespace: blocklist ip:nonce in cleanup job
2025-09-24 11:57:28 -05:00
Madhu Rajanna 5ae49cf7a0 namespace: blocklist ip:nonce in cleanup job
blocklisting IP can cause problems when the cleanup
job pod runs on the same host or gets the same ip
as that of the rbd client ip that is present in
the rbd status/watchers. instead of blocklisting
the whole ip of the node or the client blocklist
only the unique ip:nonce to allow the node to not
have any effect because of the cleanup job.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2025-09-24 12:47:48 +02:00
Travis Nielsen cbbe9b07b0 Merge pull request #16488 from sp98/fix-forceful-encrypted-osd-creation
osd: clean encrypted disks from other clusters
2025-09-23 15:02:39 -05:00
Santosh Pillai ec271bdde3 osd: clean encrypted disks from other clusters
Clean encrypted disks from other clusters by checking the cephFSID in
the luks header.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-09-23 11:29:09 +05:30
Travis Nielsen df49ca1247 pool: allow enablecrushupdates to be nil
Enabling crush updates is false by default, and can be enabled
if set to true. The setting needs to be nullable in case
we need to differentiate between the value being set
to false or just not set, to know if the default should be
different. This is necessary for rook consumers who are
refererencing the pool struct and want to change the default,
rather than using rook's default value of false.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-09-11 16:40:37 -06:00
parth-gr 794a232835 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>
2025-09-03 21:41:52 +05:30
Blaine Gardner 7c33186e72 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>
2025-08-27 14:47:45 -06:00
Denis Egorenko c9e0f89a8b 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>
2025-08-15 22:59:34 +04:00
subham rai 70f465745b Merge pull request #16272 from Madhu-1/fix-filepath
core: use filepath.Join instead of path.Json and add unit testing for cleanup functions
2025-08-12 14:59:40 +05:30
Blaine Gardner 59ca78229d Merge pull request #16075 from sp98/mirror-key-rotation
rbd mirror peer key rotation
2025-08-11 10:54:20 -06:00
Santosh Pillai ee0b137d75 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>
2025-08-11 21:53:14 +05:30
Madhu Rajanna 878603ba25 core: add unit testing for cleanup
Adding unit testing for cleanup
functions.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2025-08-08 12:55:23 +02:00
Madhu Rajanna 4501c86d9f core: use filepath instead of path
using filepath instead of path to
join the filepath as path is usually
used for URL not for files.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2025-08-08 12:46:25 +02:00
Oded Viner 87165cc6d1 core: cleanup csi-related folders from /var/lib/rook during uninstall
delete csi-related directories from /var/lib/rook that
match the suffix `.csi.ceph.com`.
these folders were used in earlier versions when rook managed
cephcsi directly. in later versions, logs and data are redirected
to /var/lib/cephcsi, but legacy paths may still exist and require
cleanup during uninstall.
this change improves cleanup completeness for odf 4.18 and earlier.

example of directories removed:
- /var/lib/rook/openshift-storage.cephfs.csi.ceph.com
- /var/lib/rook/openshift-storage.rbd.csi.ceph.com

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-08-07 18:54:54 +03:00
Benoît Knecht d7f08693ed core: set erasure-code-profile plugin based on pool algorithm
When a `CephBlockPool` defines `spec.erasureCoded.algorithm`, use it as
the erasure-code-profile plugin.

Until now, that parameter would have been ignored completely, and every
erasure-coded pool would use the same plugin as the `default`
erasure-code-profile (i.e. `jerasure`).

Note that using any algorithm other than `jerasure` or `isa` is likely
to fail given the current implementation, as different algorithm require
different sets of parameters, and those cannot be supplied by the
user.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2025-08-04 15:59:24 -06:00
Oded Viner 5992415b36 core: improve cleanup of /var/lib/rook during cluster teardown
extend StartHostPathCleanup to remove additional directories
under /var/lib/rook

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-07-31 19:14:24 +03:00
Travis Nielsen 79a7a3c01f rgw: increase timeout for admin user creation
Creating the rgw admin user is taking on the order of two
minutes instead of the expected seconds, thus the command
was timing out and cause the object store user creation
to fail. The increased timeout allows the admin user creation
to complete, and other users to be created as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-07-30 12:22:07 -06:00
Santosh Pillai c615967fa8 Merge pull request #16040 from subhamkrai/rotate-csi-keyrings
csi: automate CSI cephx key rotation
2025-07-29 11:09:50 +05:30
subhamkrai 6d5401c50d csi: automate CSI cephx key rotation
This PR implements the CSI cephx key rotation feature,
which follows overlapping rotation for non-daemon keys.
Refer to the cephx rotation API from design PR 15915 for details.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-07-25 15:39:00 +05:30
subhamkraiandMadhu Rajanna fb1047eb10 rbdmirror: with multus gen file on remote container
In case of RDR with multus, the file which contains peer
connection details need to generated on mgr proxy remote
since rbd commands in multus, commands are run via mgr
proxy container and not the rook operator pod.

Co-Authored-by: Madhu Rajanna <madhupr007@gmail.com>
Signed-off-by: subhamkrai <srai@redhat.com>
2025-07-24 12:27:52 +05:30
Travis Nielsen 009e8eb254 Merge pull request #15666 from puskunalis/cleanup-fix-disk-shredding
osd: fix cleanup job disk shredding
2025-07-10 10:28:46 -06:00
subhamkrai 2742a707cc operator: add missing udev env to discover pod
currently, we're setting the env `DISCOVER_DAEMON_UDEV_BLACKLIST`
in operator.yaml but we're not reading from the operator env and
setting the value to discover pod env.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-07-08 17:13:01 +05:30
Vilius Puškunalis 27010f96f3 osd: fix cleanup job disk shredding
Fixes quick disk shredding by using dd to shred data at additional offsets where ceph metadata is duplicated. For full shred, the shred utility remains in use.

Signed-off-by: Vilius Puškunalis <47086537+puskunalis@users.noreply.github.com>
2025-06-23 21:46:41 +03:00
Kyori Sakao 015e4f4ecf osd: remove redundant err check
remove redundant nested `if err != nil` checks

Signed-off-by: Kyori Sakao <system.222.down@gmail.com>
2025-06-19 10:08:33 +09:00
Travis Nielsen c8e40d4da2 Merge pull request #16009 from sp98/fix-rns-deletion
rbd: blocklist rns image watchers
2025-06-17 11:35:55 -06:00
Santosh Pillai 98475e847e pool: blocklist rns image watchers
When force-deletion annotation is added to CephRadosNamespace CR, then
blocklist any watchers on the Namespace images in order to remove the
image from the trash

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-06-17 21:21:33 +05:30
Travis Nielsen 55c3e4d249 Merge pull request #15997 from subhamkrai/fix-code-syntax
osd: code cleanup in getSecret method
2025-06-17 07:39:31 -06:00
subhamkrai 0123ab0ab3 osd: code cleanup in getSecret method
This change refactors the getSecret method somewhat toward cleaner code.
The only additional change in behavior is the introduction of a switch instead
of multiple if's and error treatment of the case of an empty secret.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-06-17 17:16:48 +05:30
Madhu Rajanna 4da69e6801 core: remove dead code
There are image create,delete,map
and unmap functions added very long back
when Rook was supporting flex driver. As
we dont have support for it and Rook doesnt
create or map rbd images. Moving the dead
code from the repo.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2025-06-13 15:10:57 +02:00
Santosh Pillai 03fa5a6b9d Merge pull request #15972 from sp98/clean-encrypted-osd-disks-from-other-clusters
osd: wipe encryted osd disk from other cluster
2025-06-12 09:13:06 +05:30
Travis Nielsen 433a16c090 Merge pull request #15951 from OdedViner/target_size_ratio_negative
pool: support targetSizeRatio=0 and default compressionMode=""
2025-06-11 07:35:24 -06:00
Santosh Pillai 71bcdb533e osd: wipe encryted osd disk from other cluster
During the OSD preparation step, if the encrypted OSD disk belongs to a
different cluster, then clean the disk if `wipeDeviceFromOtherClusters`
is set to true.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-06-11 15:22:28 +05:30
Oded Viner dd65dc15d8 pool: support targetSizeRatio=0 and default compressionMode=""
allow targetSizeRatio == 0
enforce targetSizeRatio >= 0 via +kubebuilder:validation
set targetSizeRatio and compressionMode="" if unset
remove IsTargetRatioEnabled() and IsCompressionEnabled()

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-06-11 12:36:19 +03:00
Blaine Gardner 029c345372 Merge pull request #15813 from BlaineEXE/auth-rotate
object: automate RGW cephx key rotation
2025-06-10 12:51:50 -06:00
Travis Nielsen 15ed0479a7 Merge pull request #15989 from parth-gr/fix-mirroring
rbdmirror: fix the nil point error check during status updates
2025-06-10 10:16:44 -06:00
Blaine Gardner 5f50e85a25 object: implement cephx key rotation for rgw keys
This is the first implementation of CephX key rotation in Rook.
Adds key rotation API from design PR 15915.

Also add helper methods for rotating keys, determining when keys
need to be rotated, and for generating CephX key statuses. These will be
reusable for other Rook reconciles beyond object/RGW.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-06-10 09:06:58 -06:00
parth-gr 0b4f89873c rbdmirror: fix the nil point error check during status updates
the status  was still reading from the nil state,
updated the code to dont read from  nil object

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-06-10 20:24:53 +05:30
Santosh Pillai 2c1bb7443a Merge pull request #15796 from sp98/clean-osd-disks-from-old-clusters
osd: clean osd disks before reinstalling cluster
2025-06-09 14:03:49 +05:30
Santosh Pillai 2bcf196b15 osd: clean osd disks before reinstalling cluster
Allow force creation of OSD on a device previously configured in a different ceph cluster.
The OSD prepare pod job will zap the OSD disk using ceph-volume lvm zap
if that disk has metadata from a different ceph cluster.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-06-06 16:32:18 +05:30
Blaine Gardner d5c4eca3fb core: ensure consistent LeastUptodateDaemonVersion
LeastUptodateDaemonVersion() unmarshals Ceph's daemon versions JSON
output into `map[string]<type>` maps which are not guaranteed to iterate
in the same order as output by Ceph. Fix this method to no longer assume
iteration order is the same order as Ceph's output.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-06-03 09:10:18 -06:00