Commit Graph
3605 Commits
Author SHA1 Message Date
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
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
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
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
Travis Nielsen 44994bbd22 namespace: add conditions blocking deletion for rados namespace
When a rados namespace is deleted, it cannot be purged
until its images and snapshots are deleted. Now a condition
is being added to the rados namespace CR status so the user
does not need to read the operator log to discover the cause.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 530223c5b4)
2025-05-07 22:20:53 +00:00
Travis Nielsen f749590a71 block: add condition for deletion blocked with images
When the blockpool is deleted and there are images or
snapshots in the pool, the deletion is blocked by the
finalizer until they are all removed. The condition added
to the cephblockpool status only indicated if there were
radosnamespace dependencies. A new condition is now added
to describe if there are images or snapshots.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 0a3a599580)
2025-05-07 22:20:52 +00:00
Travis Nielsen f7d3ae0544 Merge pull request #15806 from rook/mergify/bp/release-1.17/pr-15793
ceph: Update caps to include executable permission (backport #15793)
2025-04-30 12:42:12 -06:00
Artem Torubarov 4299ccdd22 rgw: cleanup prev ops log config from mon db
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
(cherry picked from commit d5e4df2186)
2025-04-30 15:42:44 +00:00
Artem Torubarov cb95837409 rgw: use pod name in ops log filename
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
(cherry picked from commit c1fd2f2ee8)
2025-04-30 15:42:44 +00:00
Felix Prasse 3a3f75fc5d csi: update caps to include executable permission
ceph-csi uses an exclusive lock for cryptfs operations. This needs the x capability on the metadata pool.

Fixes #15283

Signed-off-by: Felix Prasse <1330854+flx5@users.noreply.github.com>
(cherry picked from commit 8f53522162)
2025-04-30 14:55:20 +00:00
Justin Cichra 0f310c8c59 exporter: add name to containerPort
Named containerPort is a useful feature when generating dynamic scrape
targets with prometheus.

This makes it clear that the containerPort is intended for metrics
scraping.

The name matches that which is on the mgr deployment.

Signed-off-by: Justin Cichra <jcichra@cloudflare.com>
(cherry picked from commit 12c36e9472)
2025-04-29 19:15:14 +00:00
subhamkrai c29bb19051 rbdmirror: logs message should not end with period
improving logging to include name and namespace of resource
and also namespace should not end with period.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit fe776fd4fe)
2025-04-29 15:45:08 +00:00
Patryk Rostkowski f88622ef7c operator: specify ceph config via secret
Adds .spec.cephConfigFromSecret to CephCluster for loading
Ceph config parameters from a Kubernetes Secret.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
(cherry picked from commit 45b0ef2104)
2025-04-23 17:54:42 +00:00
Blaine Gardner ace9597404 object: lower retry log verbosity in notification OBC controller
Lower the verbosity of a message in the notification controller's OBC
label watcher. If the OBC controller is having issues provisioning the
OBC, this log will spam every 10 seconds. Reduce the message verbosity
level to debug.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 08233d5b6d)
2025-04-22 16:55:29 +00:00
Travis Nielsen 5be41e2b8a object: log all reconcile errors during object store creation
The object store controller was swallowing errors of the
type not found, assuming a certain category of errors
when ceph may still be initializing. But some of these
errors could be user error and they need to troubleshoot
the details of the error, so we need to log the specific
error instead of swallowing it.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 95a5920bef)
2025-04-21 16:14:45 +00:00
Joshua Hoblitt 76f4877ed9 object: add CephBucketTopic .spec.endpoint.kafka.{user,password}SecretRef
userSecretRef and passwordSecretRef fields are added to allow the Kafka
endpoint username and password to be supplied from a Kubernetes Secret,
rather than exposed as plaintext as part of the endpoint URI. If the
endpoint URI has HTTP basic auth user-id and user-pass components, they
are overridden by userSecretRef and passwordSecretRef.

Squid added bucket topic attributes for configuring the user-name and
password for pushing notifications to Kafka as an alternative to
encoding credentials into the URI. However, these attributes are not
supported under Reef. Thus, this initial implementation relies on URI
mangling for compatible with both Reef and Squid. Future work could
using Ceph version detection and switch to the new attributes to be used
with Squid and/or the implementation could be converted exclusively to
use the new attributes once Rook has dropped support for Reef.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 7887f03c5c)
2025-04-16 18:25:48 +00:00
Santosh Pillai c6704a241e mon: always delete mon canary pods
In case of multicluster service, we need to always delete the mon-canary
pods even if there is any failure while exporting the service, else
multiple mon canary pods will get created.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 75c6bb8cd2)
2025-04-16 14:34:47 +00:00
Santosh Pillai 906dde225d core: fix logs to print correct OSD ID
use %d to print integer osd.ID

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit e0d2275c8b)
2025-04-16 13:39:48 +00:00
Rakshith R cbbee37fb1 csi: update cephcsi to latest release
This commit updates cephcsi version to 3.14.0
in rook.

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit a555885a5f)
2025-04-14 14:23:58 +00:00
Peter Razumovsky 5949c189af pool: retry status update on fail
In some cases, for example, kube-api nods, CephBlockPool's status
could be failed to update. In that case, rook-operator does not
tries to update status again. This fix requests for requeue if pool's
status update is failed.

Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
(cherry picked from commit d7c67fecee)
2025-04-09 17:15:26 +00:00
Travis Nielsen ede1d63931 core: skip reconcile when adding the finalizers
When finalizers are added to the CRs, a follow-up reconcile
will be triggered due to the increased generation on the CR.
Therefore, abort the initial reconcile when adding the finalizer,
and allow the follow-up reconcile to complete the configuration.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit f7fb1bc0f2)
2025-04-09 16:41:41 +00:00
mergify[bot] 817756eaf7 Merge pull request #15665 from rook/mergify/bp/release-1.17/pr-15660
csi: remove dummy code in csi driver creation (backport #15660)
2025-04-07 17:32:36 +00:00
Santosh Pillai 1d7ec25a55 osd: fix pdbs in case of node drain
the maxunavailable count was getting reset back to 1 after 60 seconds.
This PR prevents resetting of the maxUnavailable OSD count.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit e83ca35531)
2025-04-07 15:59:30 +00:00
Madhu Rajanna d6c1821e67 csi: remove dummy code in csi driver creation
EnableCSIDriverSeLinuxMount is always set to true
, This commit remove the extra variable as its a
introduced where we supported older kubernetes version.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit b08765f525)
2025-04-07 14:13:28 +00:00
Blaine Gardner 6dc5d6c9d8 nfs: set allow_set_io_flusher_fail=true in config
NFS-Ganesha 6.1 requires this config to be set to allow it to run in a
non-privileged container so it doesn't hit a permission failure. As long
as the ganesha.nfsd process isn't run with the `-x` option, earlier
versions of NFS-Ganesha that don't have this config won't complain.

Related cephadm PR: https://github.com/ceph/ceph/pull/60077

This may be necessary for supporting future Ceph Squid versions
according to discussions here:
https://github.com/ceph/ceph-container/issues/2246

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 947ca8b458)
2025-04-04 19:48:45 +00:00
Travis Nielsen 962b995196 core: use filter only if its set to non empty string
Also check for the empty namespace instead of an
empty name which was incorrect.

Co-authored-by: Nikita Sivukhin <sivukhin@turso.tech>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 71a4fce87b)
2025-04-04 18:12:06 +00:00
Joshua Hoblitt 5fb622e6d1 core: typed watch handlers and predicates
All existing controller runtime watches are converted to use "typed"
handlers and predicates instead of operating on `client.Object`.  The
intent is to be bug for bug equivalent with the existing logic while
replacing run time type assertions and switch statements with compile
time type constraints and type casts. In several cases, functions using
assertions were split up such that each function only handles a single
Kind at a time. It is hoped that this will improve readability and
maintainability while facilitating future refactoring such as migrating
some watches to using IndexFields.

Of particular note is that the massive switch statement in
`WatchControllerPredicate()`  from
`pkg/operator/ceph/controller/predicate.go` has been replaced with
generics, reflection, and splitting the obc logic into its own predicate
function. There are still many helper functions operating on
`client.Object`. These were not updated unless required by the compiler
in order to limit the size of this change. The type safety of these
funcs should be improved as followup work.

 It is strongly suggested that going forward, handlers and predicates
 only handle a single Kind (generic or not) and that switches / type
 assertions are heavily discouraged or forbidden. This PR removed all
 but a single switch statement in a predicate, which should be addressed
 in future work.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9f1ed201db)
2025-04-04 17:18:33 +00:00
Patryk Rostkowski b02190290d operator: decouple mon and mgr post-startup operations
Fixes an ordering issue where spec.cephConfig settings failed to apply
because the manager wasn't yet running. Moved the config logic from
postMonStartupActions() to a new postMgrStartupActions() to ensure
the mgr is ready before applying config, allowing successful reconciliation.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
(cherry picked from commit 44a2eaf02f)
2025-04-03 20:32:35 +00:00
Joshua Hoblitt 1a747d8a60 object: add CephObjectStoreUser.spec.keys
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 6b2c357871)
2025-04-03 18:57:57 +00:00
Blaine Gardner bd0974827e Merge pull request #15629 from rook/mergify/bp/release-1.17/pr-15554
rgw: Support Kafka auth mechanism parameter (backport #15554)
2025-04-02 10:21:56 -06:00
Blaine Gardner cf0444a73b Merge pull request #15631 from rook/mergify/bp/release-1.17/pr-15459
rbdmirror: mirroring b/w implicit and defined ns (backport #15459)
2025-04-02 10:21:24 -06:00
Travis Nielsen cadcb70a0f Merge pull request #15618 from rook/mergify/bp/release-1.17/pr-15522
mon: manage endpoints containing set of mon ip addresses (backport #15522)
2025-04-01 13:12:11 -06:00
subhamkrai f73f34bd51 rbdmirror: mirroring b/w implicit and defined ns
this commit add support for mirroring b/w implicit rados namespace and
defined rados namespace. To support this, rook will treat `<implicit>`
name on cephblockpool as `""` empty string. This will allow mirroring
b/w implicit and defined radosnamespace.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 420178fe3e)
2025-04-01 18:56:52 +00:00
Ragnar Dahlén 98777ece70 rgw: support kafka auth mechanism parameter
Ceph has support [1,2] for configuring which authentication
mechanism to use for bucket notifications using Kafka topics.

This commit adds the corresponding support to rook.

[1]: https://github.com/ceph/ceph/pull/48181/commits/d5dce601f65974a21c83c4b1add036030a75c3c4
[2]: https://tracker.ceph.com/issues/57608

Signed-off-by: Ragnar Dahlén <r.dahlen@gmail.com>
(cherry picked from commit 8bf7c679bb)
2025-04-01 16:45:31 +00:00
Michael Adam 27b96e196f tests: fix intermittent failure of TestWaitForDeploymentsToUpdate
The unit test TestWaitForDeploymentsToUpdate intermittently failed
in the CI. The suspected root cause is clow CPUs in github CI runners.

This fixes the intermittent CI failure by increasing the timings in the test
code.

Resolves: #15583

Co-Authored-By: Blaine Gardner <blaine.gardner@ibm.com>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 0c9e7a384b)
2025-04-01 14:48:38 +00:00
Patryk Rostkowski 0c4bdf81a0 mon: manage endpoints containing set of mon ip addresses
The change creates and manages an Endpoints resource
with the current Ceph monitor (mon) IPs, allowing
clients to resolve mon IPs via DNS without relying
on the rook-ceph-mon-endpoints ConfigMap.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
(cherry picked from commit 08199b27c9)
2025-03-31 16:43:20 +00:00
Santosh Pillai a5306b57d4 rgw: support read affinty for localized reads
allows selecting Read Affinity policy from the ObjectStore API
aets `--crush-location=host` for RGW daemons.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit deb010c32e)
2025-03-31 15:27:12 +00:00
Joshua Hoblitt 3cb343f62a core: run gofumpt on all files
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-03-26 10:41:48 -07:00
Santosh Pillai daa0dc1327 Merge pull request #15408 from sp98/redo-pdbs
osd: handle OSD PDBs when OSDs fail without affecting the cluster health
2025-03-26 21:34:17 +05:30
Santosh Pillai a816b4a971 osd: allow one healthy OSD to be drained
One ore more OSDs can be down and PGs can still be active+clean (data
was rebalanced to other available OSDs). This PR sets
maxunavailable=1+downOSDs to allow one healthy to be drained.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-03-26 10:40:46 +05:30
Joshua Hoblitt dcf0a57d11 object: all CephBucketTopic reconcile errors set .status.phase
topic.reconcile() had a number of error triggered return statements
which did not update the CR's status to reflect a reconcile failure.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-03-25 09:52:37 -07:00
Blaine Gardner 20d85409ba Merge pull request #15498 from cobaltcore-dev/watch-rgw-config-secrets
Watch rgw config secrets
2025-03-25 09:33:50 -06:00
Blaine Gardner 9c1d681839 Merge pull request #15560 from rook/plumbing/rm-controller-predicate-upgrade-label-support
core: rm controller-runtime predicate support for ceph_version label
2025-03-21 15:45:43 -06:00
Blaine Gardner 01d3a5ae40 Merge pull request #15530 from jhoblitt/bugfix/CephObjectStoreUser-reconcile-status
object: all CephObjectStoreUser reconcile errors set .status.phase
2025-03-21 12:06:52 -06:00
Joshua Hoblitt 607e328e6f core: rm controller-runtime predicate support for ceph_version label
This label is not currently in use by rook.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-03-21 09:34:27 -07:00