Commit Graph
4713 Commits
Author SHA1 Message Date
parth-gr 350129fb42 pool: fix pool status check in rn controller
if the pool is just created and getting the status updated
rn controller can still go and proceed to check the pool status
which result in panic
and later it stop re-trying because of panic get swallowed
https://github.com/rook/rook/commit/cf13deee6f0aaa1ff854d57493bf91df70f8f436

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit ec242d5ee7)
2025-11-12 06:22:26 +00:00
Joshua Hoblitt af624fce38 object: fix user quotas being overwritten when obc bucketOwner is set
Resolves https://github.com/rook/rook/issues/16417

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 61cbe4fc23)
2025-11-07 18:47:08 +00:00
Travis Nielsen 3601bb97cf Merge pull request #16634 from rook/mergify/bp/release-1.17/pr-16619
mon: wait for the canary pods to be terminated (backport #16619)
2025-10-23 16:04:45 -06:00
Santosh Pillai 82ca7ab146 mon: wait for the canary pods to be terminated
Wait for the mon-canary pods to be terminated before starting the actual
mons. When topology spread constraints are added to evenly spread the
mons, then pod-anti affinity does not allow mons to be created on the
same node where other mons are running, this also includes the
mon-canary pods. We delete the mon-canary pods and then start the actual
mon pods. Sometimes the termination of the canary pods might take more
time, so schedular won't schedular mon pods on that node.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 3137a857df)
2025-10-23 16:46:17 +00:00
Travis Nielsen ddaf3a2c80 mon: trap the sigterm in the mon canary
The mon canary should quickly shut down after the pod is
deleted, since it has no purpose to continue running.
Since the sleep does not catch the SIGTERM as pid 1,
use a bash trap to exit quickly.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 48b70500fa)
2025-10-23 16:45:22 +00:00
Madhu Rajanna 23e7390f8e 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>
(cherry picked from commit 5ae49cf7a0)
Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-25 14:57:57 +05:30
Joshua Hoblitt bd40cee69e core: fix ObjectZoneSpec.ZoneGroup field description
Resolves this incorrect field description:

     ~ $ k explain cephobjectzone.spec.zoneGroup
    GROUP:      ceph.rook.io
    KIND:       CephObjectZone
    VERSION:    v1

    FIELD: zoneGroup <string>

    DESCRIPTION:
        The display name for the ceph users

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 8b58d68592)
2025-09-17 11:47:20 +00:00
Joshua Hoblitt 5be2085768 core: fix ObjectZoneGroupSpec.Realm field description
Resolves this incorrect field description:

     ~ $ k explain cephobjectzonegroup.spec.realm
    GROUP:      ceph.rook.io
    KIND:       CephObjectZoneGroup
    VERSION:    v1

    FIELD: realm <string>

    DESCRIPTION:
        The display name for the ceph users

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 1a1478a342)
2025-09-17 11:47:19 +00:00
Denis Egorenko 72fdce486d 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
Denis Egorenko 4b71477621 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:32:20 -06:00
Travis Nielsen f37ebcd0cd Merge pull request #16262 from rook/mergify/bp/release-1.17/pr-16244
csi: add CrossNamespaceVolumeDataSource feature gate (backport #16244)
2025-08-07 12:25:01 -06:00
Travis Nielsen 02315a8783 Merge pull request #16264 from rook/mergify/bp/release-1.17/pr-16260
core: cleanup csi-related folders from /var/lib/rook during uninstall (backport #16260)
2025-08-07 12:24:32 -06:00
Oded Viner 572f4ead49 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:10 +00:00
Oded Viner 2bd3ec1afb 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>
(cherry picked from commit 87165cc6d1)
2025-08-07 16:24:10 +00:00
CL0Pinette 0a5b692342 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:25 +00:00
Benoît Knecht 7de58d6648 core: only support isa and jerasure algorithms on ec pools
The `CephBlockPool` CR allowed any algorithm to be specified in
`spec.erasureCoded.algorithm`, but in practice only `isa` or `jerasure`
would work.

Make that restriction explicit by restricting this field to `isa` or
`jerasure` in the CRD.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 0b423a30f9)
2025-08-04 22:47:50 +00:00
Benoît Knecht 18e119dc38 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>
(cherry picked from commit d7f08693ed)
2025-08-04 22:47:49 +00:00
Joshua Hoblitt d698edfb6f 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 15e9669c18 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:08 +00:00
Oded Viner 8abce40d7d 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>
(cherry picked from commit 5992415b36)
2025-07-31 17:36:11 +00:00
chentao.2022 4f2c92a6c8 osd: exclude labels with a value of null from the topology string
Avoid the OSD startup failing to parse crush_location when
the topology label is empty.

Signed-off-by: chentao.2022 <chentao.2022@bytedance.com>
(cherry picked from commit 62631d2614)
2025-07-30 22:41:33 +00:00
Travis Nielsen a08cd25a9b 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>
(cherry picked from commit 79a7a3c01f)
2025-07-30 21:39:16 +00:00
Oded Viner ee0bae1a6c core: log panics in controller reconcile functions
add RecoverAndLogException() helper to log panics with stack trace.
added defer call in all rook controller Reconcile() methods for
better error visibility in operator logs

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit cf13deee6f)
2025-07-29 16:00:49 +00:00
José Martínez 7e3f4dd4e7 mds: use bash for executing liveness probe script
This script includes bash features and will fail if sh is not a symlink to bash.

Signed-off-by: José Martínez <xose@google.com>
(cherry picked from commit e421623fd0)
2025-07-28 21:04:03 +00:00
Madhu Rajanna 0c48f8ed41 csi: update ceph-csi to 3.14.2
Updating the ceph-csi image to 3.14.2
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 052fe4a9af)
2025-07-22 20:22:33 +00:00
mergify[bot] 6ced439790 Merge pull request #16148 from rook/mergify/bp/release-1.17/pr-16133
multus: support copy file to cmd-proxy container for rgw zone set (backport #16133)
2025-07-16 20:59:52 +00:00
Artem Torubarov 60231a442d multus: support copy file to cmd-proxy container for rgw zone set commands
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
(cherry picked from commit c88e6ea952)
2025-07-16 16:29:51 +00:00
Oded Viner 0f395e7851 core: fix nil pointer panic when startupProbe is set in cephfilesystem
fixes a nil pointer dereference in GetProbeWithDefaults when
startupProbe is set in cephfilesystem and currentProbe is nil.
adds panic recovery in cephfilesystem reconcile loop to improve
error visibility and avoid silent reconcile restarts.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 51e9ddc3f5)
2025-07-16 16:04:42 +00:00
Travis Nielsen 0c934f247c core: update go modules to latest except for go 1.24
Update all the go modules to the latest, except for the modules
that require go 1.24. Those modules will be updated in a
follow-up change.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 24b0b866ab)
2025-07-16 08:16:24 -06:00
Elias Carter ab9475220c osd: treat non existing OSD nodes as drained
If the node for an OSD does not exist within kubernetes, the PDB
reconciliation logic will fail to make progress. This can be problematic
as new OSDs added to the cluster may not be protected by OSD PDBs after
they are added since the PDB reconcilation logic is failing.

The solution is to treat non existing OSD nodes as drained which is
logically consistent with treating unschedulable OSD nodes as drained as
you cannot schedule a pod onto a node which does not exist.

Fixes: #16086

Signed-off-by: Elias Carter <elias@dropbox.com>
(cherry picked from commit 5f2d6c01d7)
2025-07-15 16:18:44 +00:00
mergify[bot] 5889aea80b Merge pull request #16117 from rook/mergify/bp/release-1.17/pr-16056
mon: Failover with host network must use different node (backport #16056)
2025-07-10 17:22:22 +00:00
Travis Nielsen fe98e65d44 mon: failover with host network must use different node
When a mon is failed over, the old mon is left in mon quorum
until the new quorum is confirmed in quorum. When host networking
is enabled, this may result in two mons being in quorum with the
same ip, if the new mon is scheduled on the same node as the
down mon. This results in daemon crashes in the cluster since
they are confused by multiple of the same ip in the mon map.

The solution is to avoid scaling down the bad mon when host networking
is enabled. This will ensure the new mon is not scheduled on the
same node as the previous mon. With host networking, either another
node is necessary or the original mon must come back online to
restore quorum.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit aa61ddb57e)
2025-07-10 16:51:31 +00:00
Vilius Puškunalis cb48cd18e1 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>
(cherry picked from commit 27010f96f3)
2025-07-10 16:30:13 +00:00
subhamkrai 274caf435f 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>
(cherry picked from commit 2742a707cc)
2025-07-08 14:27:48 +00:00
Patryk Rostkowski 9632438413 mon: allow running mon pods as root
This change addresses a permission issue where mon pods crashloop
on some Kubernetes setups with SELinux enabled, even when
ROOK_HOSTPATH_REQUIRES_PRIVILEGED is set.

To resolve this, a new function makeMonSecurityContext() was introduced
to explicitly set runAsUser: 0 at the pod level for mon pods
when the environment variable ROOK_CEPH_MON_RUN_AS_ROOT is set to true.

Additionally, the function previously named PodSecurityContext() was renamed
to DefaultContainerSecurityContext() to avoid confusion between
container-level and pod-level security context configuration. All container
SecurityContext usages across Ceph daemons were updated to reflect this change.

This ensures the root user configuration is applied
automatically and consistently in environments where it is required
for mon pod startup, while preserving clear separation of container
and pod-level security logic.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
(cherry picked from commit 7f3e6bd7fa)
2025-07-07 16:17:14 -06:00
raaizik 016db5500b core: fix CephObjectRealm controller generated generated AccessKey invalid chars
Suggested fix for issue https://github.com/rook/rook/issues/16072
Adds key type differentiation to exclude invalid characters from AccessKey

Signed-off-by: raaizik <132667934+raaizik@users.noreply.github.com>
(cherry picked from commit 1b3f36ff5c)
2025-07-02 15:05:38 +00:00
Madhu Rajanna 47e9442638 csi: provide a flag to manage csi users
Added a flag in cephcluster CR CSI section
whether the user wants the Rook to manage
the csi users and secrets or create them on own.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 5094b1f5e6)
2025-06-27 20:59:57 +00:00
Madhu Rajanna 9f28101cc3 core: update secret handling for cephclient
If RemoveSecret is set remove the secret.
if not set, do below
check if the current cephClient is owner if
secret is present, if not return as its owned
by other controller, if its not present create
or update the secret.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit d37297475e)
2025-06-27 20:27:00 +00:00
Madhu Rajanna 0e992a9e3f core: provide option to specify secret name
When cephClient CR is created by User, the Rook
is creating an User and creating an secret with
its own predefined name + CR name, With this we
are allowing user to specify the secretName

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit d6d2e604fc)
2025-06-27 20:26:59 +00:00
Travis Nielsen 6f833fc107 Merge pull request #16051 from rook/mergify/bp/release-1.17/pr-16050
csi: update csi version to 3.14.1 (backport #16050)
2025-06-25 07:29:22 -06:00
Muhammad Adil Ghaffar 2c89453f44 exporter: add hostnetwork bool to cephexporter
Signed-off-by: Muhammad Adil Ghaffar <muhammad.adil.ghaffar@est.tech>
(cherry picked from commit 5ea7a177b7)
2025-06-24 20:50:19 +00:00
Madhu Rajanna 2a6e00d501 csi: update csi version to 3.14.1
Updating the cephcsi version to v3.14.1
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit aa8fd61986)
2025-06-24 16:40:30 +00:00
Oded Viner 02323205b8 object: allow deletion of CephObjectStoreUser even if secret is missing
skip key generation during reconcile if CephObjectStoreUser is
being deleted to allow cleanup when referenced secret is missing

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 8249a28145)
2025-06-23 16:52:01 +00:00
Santosh Pillai c1f54b1c4a 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>
(cherry picked from commit 98475e847e)
2025-06-17 11:42:43 -06:00
Travis Nielsen 47eb07305d namespace: report empty condition for rados namespace
The rados namespace status was not reporting if the namespace
was empty. Now the condition will be properly updated if
it is empty.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b47f297608)
2025-06-17 04:31:58 +00:00
Santosh Pillai 47d0e98e53 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>
(cherry picked from commit 71bcdb533e)
2025-06-12 03:44:33 +00:00
mergify[bot] 993ae032a8 Merge pull request #16001 from rook/mergify/bp/release-1.17/pr-15951
pool: support targetSizeRatio=0 and default compressionMode="" (backport #15951)
2025-06-11 15:42:16 +00:00
Oded Viner a337dd41f5 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>
(cherry picked from commit dd65dc15d8)
2025-06-11 13:37:07 +00:00
Oded Viner 16b8bfb123 core: fix radosnamespace log message
change logger.info to logger.infof to correctly print
radosnamespace name and namespace

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 41d6baf0e1)
2025-06-11 12:09:16 +00:00
parth-gr 15de5a9ae5 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>
(cherry picked from commit 0b4f89873c)
2025-06-10 16:18:06 +00:00