Commit Graph
4690 Commits
Author SHA1 Message Date
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
Santosh Pillai 1880856e8e 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>
(cherry picked from commit 2bcf196b15)
2025-06-09 08:34:33 +00:00
Praveen Hosamani f0278e23e7 build: make imagePullPolicy dynamic
Signed-off-by: Praveen Hosamani <praveen.h119@gmail.com>
(cherry picked from commit 0c0e94e43c)
2025-06-06 14:54:42 +00:00
Blaine Gardner 9e7d5d5031 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>
(cherry picked from commit d5c4eca3fb)
2025-06-03 18:26:23 +00:00
parth-gr d6178cf04e nfs: use tabs instead of spaces in nfs rgw config
currently it was using two tabs, but
others config are using one tab
So update the config to use one tag

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 58eb75b13b)
2025-06-03 16:04:34 +00:00
parth-gr e48915a820 nfs: fix nfs short name
nfs short name and crd name was same
which was conflicting,
remove the short name cephnfs as it can
be already called by the crd name

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 9a0490982e)
2025-06-02 08:59:54 +00:00
Travis Nielsen 01e0134be7 osd: debug log for long image names in label
Labels cannot be longer than 64 characters, and if the image name
is too long we log a verbose message about the label that we can
just log now as debug level.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 57585ba151)
2025-05-30 19:35:11 +00:00
Travis Nielsen 8258304851 Merge pull request #15874 from rook/mergify/bp/release-1.17/pr-15853
core: delete old svg/rns cr with same svg/rns  name (backport #15853)
2025-05-30 12:40:05 -06:00
parth-gr 88c28d2ade nfs: fix the skip reconcile call
currently nfs is used as the unique selector
for daemon id, which returns  nfs: ocs-storagecluster-cephnfs-a

Updating the has() to function to check the same label value
(n.Name + "-" + id)

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 79f44a4660)
2025-05-30 17:12:40 +00:00
subhamkrai c5466a310f osd: don't set dmcrypt env in prepare pod job spec
this commit remove the code which sets the dmcrypt encryption
key from secret as environment variable in the prepare pod job
spec. Now, the env will be set under function `setKEKinEnv`, which
tries to reads secret from k8s first method `c.IsK8s()`under
`GetSecret` and then check for KMS to ready and apply env directly.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit d86aa28f30)
2025-05-29 15:11:25 +00:00
Patryk Rostkowski d09776483c nfs: skip NFS daemon reconciliation when labeled with skip-reconcile
This change adds support for skipping reconciliation of CephNFS daemons
that are labeled with `ceph.rook.io/skip-reconcile=true`.
Similar to MDS, MGR, and RGW components, this allows cluster operators
to prevent Rook from modifying specific NFS daemon deployments.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
(cherry picked from commit 612e54e1ae)
2025-05-27 22:12:37 +00:00
Patryk Rostkowski 24f4b955c7 core: add short names to rook CRDs
This commit Assigns short names to all Rook CRDs
to improve kubectl usability.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
(cherry picked from commit ae6e1e0863)
2025-05-27 21:24:32 +00:00
Oded Viner 1c85ddd327 core: improve reporting for reconcile requeue cases
when a reconcile returns a requeue result without an error
(e.g. due to a missing cephcluster), the previous logic reported
it as a successful reconcile. this was misleading and made it
hard to understand the actual controller behavior this
change adds a new condition to log and emit a "requeuing" event
when reconcileResponse.Requeue is true and err is nil.
this ensures more accurate event reporting and improves observability across
all controllers using reportreconcileresult.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 83ce9a6a63)
2025-05-21 13:45:39 +00:00
Travis Nielsen 584b1196ff Merge pull request #15881 from rook/mergify/bp/release-1.17/pr-15867
csi: enable CSI Metadata Injection by Default (backport #15867)
2025-05-20 11:20:09 -06:00
Oded Viner b0beb387b8 csi: enable CSI Metadata Injection by Default
This PR sets CSI_ENABLE_METADATA to true by default in the
Rook configuration, ensuring that the --setmetadata=true
flag is added to CSI nodeplugin pods

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit ce59c72eb1)
2025-05-20 16:47:59 +00:00
Niels de Vos 0d57154457 csi: update Kubernetes CSI sidecar images to current versions
The Kubernetes CSI sidecars have had several releases that were not
included in deployments by Rook yet, update them to the versions that
are available today:

- csi-attacher:v4.8.1
- csi-provisioner:v5.2.0
- csi-resizer:v1.13.2
- csi-snapshotter:v8.2.1

This change is important, because Ceph-CSI will implement the new
Controller.GetSnapshot CSI procedure. A bug in csi-lib-utils causes a
panic when a ControllerCapability is provided, but not (yet) known to
the CSI sidecars. The updated sidecars consume a version of
csi-lib-utils with a fix for that panic.

See-also: kubernetes-csi/csi-lib-utils#188
Signed-off-by: Niels de Vos <ndevos@ibm.com>
(cherry picked from commit a168c40008)
2025-05-20 16:29:51 +00:00
Carlos Barria 0889541d29 core: fix golangci-lint check ST1005
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
(cherry picked from commit 61494d1baf)
2025-05-20 07:25:13 +00:00
subhamkrai 012576ff18 namespace: delete old rns cr with same block pool name
there can be a scenario where a new RNS CR is created with
the same spec.blockPoolName and spec.name, in that case we want to delete
the old RNS CR without checking dependent child resources.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit ebc1671ab7)
2025-05-19 16:03:02 +00:00
subhamkrai 76df880480 subvolumegroup: delete old svg cr with same svg fs name
there can be a scenario where a new svg cr is created with
the same svg.filesystem and svg.spec.name, in that case we want to delete
the old svg CR without checking dependent child resources.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 1ef660f749)
2025-05-19 16:03:02 +00:00
Travis Nielsen 3e3a76976b mgr: continue reconcile if prometheus not installed
When monitoring is enabled, if the service monitor fails
creation, the reconcile will fail and rook will never
create the OSDs. A number of users have been blocked during
install due to this issue. Let's allow reconcile of the
full cluster even in this error case. After they install
prometheus, they would then need to trigger a reconcile again
perhaps by restarting the rook operator to enable
the service monitor.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit ca12916438)
2025-05-16 16:30:30 +00:00
parth-gr 88067c4aab osd: osd should watch for pvc resize
With a osd resize operation, currently pvc and pv may
takes more time then expected.
And so the osd dont get resized and need manual re-start
as currently we don't have a watch on osd's
controller that watches pv and get it resized.

add a wait time till pvc is not resized

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit 94450c0db7)
2025-05-15 20:12:59 +00:00
parth-gr b9e24171ab rbdmirror: fix mirroring status on pool and rn
there is a change  from ceph on how the status
of the mirroring will look like,
Adopting with new fields so the status is correctly synced,
And other components might rely on the status too

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit aa326a9419)
2025-05-15 17:10:54 +00:00
Yifeng Zhang 922f5f0b80 network: fix validation rule on provider field update
Provider validation is failing on updating from empty string to non-empty ones
which is expected to be supported. Fix the validation rule by adding one missing
condition.

Signed-off-by: Yifeng Zhang <Yifeng.Zhang@cerebras.net>
(cherry picked from commit 93ccf4c9c2)
2025-05-09 18:15:24 +00:00
Joshua Hoblitt 00503b8da0 object: change CephObjectStore "foo" found log level to debug
When multiple `CephObjectStoreUser` CRs are present, the operator logs a
high volume of `CephObjectStore "foo" found` messages during reconcile.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit f1fad531eb)
2025-05-08 17:03:37 +00:00