Commit Graph
4653 Commits
Author SHA1 Message Date
Joshua Hoblitt 300a22398e object: fix uppercase serialization of fields in KafkaEndpointSpec
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-05-02 10:29:29 -07:00
Blaine Gardner e3149e36e8 Merge pull request #15605 from cobaltcore-dev/rgw-ops-log-rename
rgw: use pod name in ops log filename
2025-04-30 09:41:04 -06:00
subham rai a4615c5eaa Merge pull request #15793 from flx5/feature/cephfs-encryption-caps
ceph: Update caps to include executable permission
2025-04-30 20:01:38 +05:30
Artem Torubarov d5e4df2186 rgw: cleanup prev ops log config from mon db
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2025-04-30 10:00:14 +02:00
Travis Nielsen 9237157e0c Merge pull request #15801 from jrcichra/exporter-containerport-name
exporter: add name to containerPort
2025-04-29 13:13:59 -06:00
Justin Cichra 12c36e9472 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>
2025-04-29 14:34:25 -04:00
Felix Prasse 8f53522162 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>
2025-04-29 19:48:40 +02:00
subhamkrai fe776fd4fe 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>
2025-04-29 20:55:36 +05:30
Artem Torubarov c1fd2f2ee8 rgw: use pod name in ops log filename
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2025-04-29 09:43:35 +02:00
Santosh Pillai b9b34e56df Merge pull request #15761 from sp98/fix-mpath-osd-destroy
osd: fix osd disk cleanup for mpath setups
2025-04-28 13:45:52 +05:30
Blaine Gardner 8d0ed0e66f Merge pull request #15696 from patrostkowski/feature/ceph-config-secret-ref-15678
operator: specify ceph config via secret
2025-04-23 11:48:24 -06:00
Patryk Rostkowski 45b0ef2104 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>
2025-04-23 07:51:22 +02:00
Blaine Gardner 7a2e65f288 Merge pull request #15764 from BlaineEXE/notification-log-level-change
object: lower retry log verbosity in notification OBC controller
2025-04-22 10:54:00 -06:00
Blaine Gardner 08233d5b6d 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>
2025-04-22 10:06:27 -06:00
Santosh Pillai 1e9da0766e osd: fix osd disk cleanup for mpath setups
ceph-volume raw list will return the main disk instead of the mpath
setup. `ceph-volume lvm zap` on the main disks fails. This PR uses
`lsblk /mnt/<diskreference> ` to fetch the actual mapath disk and use it
for cleaning

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-04-22 12:40:08 +05:30
Travis Nielsen 95a5920bef 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>
2025-04-18 11:35:09 -06:00
Joshua Hoblitt 7887f03c5c 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>
2025-04-16 10:53:11 -07:00
Santosh Pillai 051956a08b Merge pull request #15718 from sp98/delete-mon-canary
mon: always delete mon canary pods
2025-04-16 20:03:11 +05:30
Santosh Pillai e0d2275c8b core: fix logs to print correct OSD ID
use %d to print integer osd.ID

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-04-16 12:42:05 +05:30
Santosh Pillai 75c6bb8cd2 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>
2025-04-16 10:49:39 +05:30
Blaine Gardner 137b627737 test: update ExecuteCommandWithTimeout unit test
Update the unit test for ExecuteCommandWithTimeout(). This unit failed a
CI run. This seems to have been a race condition where the previous
`cat` command was returning quickly enough that it was available to the
`select` statment at the same time as the timeout.

Resolve this issue by replacing the `cat` command with `sleep`, which
will be guaranteed to take longer to return than the timeout, ensuring
this race doesn't happen.

While working on the test, I also notice that the 30 second timeouts for
other tests would be too long in the event the commands hang for any
reason, so lower these to help ensure the CI won't time out due to
unforeseen events.

Also add a missing unit test to ensure error returns (via `false`
command) without timeouts are properly returned.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-04-14 12:19:37 -06:00
Rakshith R a555885a5f 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>
2025-04-11 18:05:44 +05:30
Blaine Gardner 5b27189ac4 core: update cephstatus fsmap gid type to uint64
Ceph uses uint64 (unsigned long) type for CephFS GID. Rook was using
int, which was causing failures when the GID overflowed Rook's type.
Update Rook's type to match Ceph's.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-04-10 12:28:23 -06:00
Santosh Pillai bdc1bf2089 build: update oauth to address cve 2025-22868
updates oauth package version to v0.27.0
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-04-10 14:23:36 +05:30
Travis Nielsen 08c97bc752 Merge pull request #15593 from prazumovsky/retry-pool-status
pool: retry status update on fail
2025-04-09 11:14:13 -06:00
Travis Nielsen efbcdb4fd6 Merge pull request #15641 from travisn/reconcile-with-finalizer
core: Reconcile CRs only after the finalizer is added by Rook
2025-04-09 10:40:47 -06:00
Travis Nielsen 89f32f5b67 Merge pull request #15677 from parth-gr/fix-goroutine
rbdmirror: fix the rados namespace health checkup
2025-04-09 09:56:12 -06:00
Peter Razumovsky d7c67fecee 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>
2025-04-09 18:47:38 +04:00
parth-gr 0c5d3ee3a5 rbdmirror: fix the rados namespace health checkup
there was very edge case,a nd that result in nil
point exception
During osd upgrades if mirror health check is called
the mirror status cmd doesnt respond
So its important to check if the value exist
before getting its summary

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-04-09 14:57:55 +05:30
Travis Nielsen f7fb1bc0f2 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>
2025-04-08 13:42:58 -06:00
Santosh Pillai 7a44de0036 Merge pull request #15634 from sp98/fix-pdbs-1
osd: fix pdbs in case of node drain
2025-04-07 21:28:35 +05:30
Travis Nielsen 2c08be157f Merge pull request #15660 from Madhu-1/remove-dummy-code
csi: remove dummy code in csi driver creation
2025-04-07 08:12:29 -06:00
Madhu Rajanna b08765f525 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>
2025-04-07 13:50:09 +02:00
subhamkrai 4ae4741a82 ci: update x/net version to fix snyk issue
snyk ci failind due to older version of x/net, it's need to be in 0.38

Signed-off-by: subhamkrai <srai@redhat.com>
2025-04-07 14:47:17 +05:30
Santosh Pillai e83ca35531 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>
2025-04-07 09:40:55 +05:30
Blaine Gardner 947ca8b458 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>
2025-04-04 12:41:11 -06:00
Travis Nielsen e6142d8a4c Merge pull request #15445 from sivukhin/small-bug-fixes
Fixes for the govanish linter issues
2025-04-04 12:11:17 -06:00
Travis NielsenandNikita Sivukhin 71a4fce87b 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>
2025-04-04 18:16:07 +01:00
Joshua Hoblitt 9f1ed201db 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>
2025-04-04 09:40:56 -07:00
Travis Nielsen a0e925dfdb Merge pull request #15636 from patrostkowski/feature/mgr-module-configs-15559
operator: decouple mon and mgr post-startup operations
2025-04-03 14:31:41 -06:00
Joshua Hoblitt 6b2c357871 object: add CephObjectStoreUser.spec.keys
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-04-03 09:09:01 -07:00
Blaine Gardner e349a81a17 Merge pull request #15624 from parth-gr/rgw-ex
object: updated cephobjectstore zone spec
2025-04-02 09:47:31 -06:00
subham rai 3e1302a472 Merge pull request #15610 from alingse/patch-1
fix call errors.Wrapf with a nil value error after check another err
2025-04-02 20:32:07 +05:30
Patryk Rostkowski 44a2eaf02f 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>
2025-04-02 14:35:06 +02:00
parth-gr c47c6c5072 object: updated cephobjectstore zone api
if no multisite is used, rook creates the zone,
in the same name as cephobjectstore cr,

But cephobjectstore zone spec
shows name as empty string("")

Which is confusing for the end user, so
to remove the confusion by updating the
api defination

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-04-02 16:50:57 +05:30
Blaine Gardner 2348ff689c Merge pull request #15459 from subhamkrai/implicit-ns
rbdmirror: mirroring b/w implicit and defined ns
2025-04-01 12:56:06 -06:00
Blaine Gardner 85440169dd Merge pull request #15554 from ragnard/kafka-topic-params
rgw: Support Kafka auth mechanism parameter
2025-04-01 10:44:36 -06:00
Michael AdamandBlaine Gardner 0c9e7a384b 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>
2025-04-01 09:16:31 +02:00
subhamkrai 420178fe3e 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>
2025-04-01 10:46:06 +05:30
Travis Nielsen 9e1c78dfd5 Merge pull request #15522 from patrostkowski/feature/mon-active-ep-14986
mon: manage endpoints containing set of mon ip addresses
2025-03-31 10:42:29 -06:00