Commit Graph
4032 Commits
Author SHA1 Message Date
Joshua Hoblitt da07f0c476 osd: do not scan rbd devices in raw activate fallback
When the OSD activate init container cannot match its configured
device, it falls back to a bare 'ceph-volume raw list', which
enumerates every block device on the node and opens each one to read
bluestore labels. Opening a krbd device whose backing cluster is
unhealthy can block in uninterruptible sleep; when that device's I/O
depends on the OSD being activated, activation deadlocks.

Build the fallback scan list explicitly with lsblk and exclude the
network-backed device types that can hang when their backing storage
is unavailable (rbd, nbd, drbd) along with zram (volatile RAM). Rook
never provisions OSDs on any of these, so the fallback can never
legitimately need to find an OSD on them. loop devices are kept,
since OSDs on loop devices are supported for CI and local testing.
Fail fast if the filtered list is empty rather than degenerating back
to a full scan.

Note this hardens only the rename-fallback path. The deadlock observed
in CI (kernel hung tasks under 'ceph-volume raw activate' opening a
stalled /dev/rbd0; actions runs 27325963851, 27333888237, and
27378983111, which reproduced it on this PR's own head) ultimately
originates inside ceph-volume: 'raw activate' runs an unconditional
LUKS2/TPM2 discovery sweep over all block devices even when given an
explicit --device. That requires a ceph-volume fix; this change makes
the Rook-controlled scan safe regardless of ceph version.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-22 10:00:58 -07:00
Joshua Hoblitt 0f5d8ba37f Merge pull request #17682 from jhoblitt/maint-remove-dead-k8sutil-daemonset
k8sutil: remove unused daemonset helpers
2026-06-11 14:21:17 -07:00
Travis Nielsen d8dd41a623 Merge pull request #17701 from OdedViner/nvme_image
nvmeof: fetch gateway image from ceph config when not in CR
2026-06-11 12:02:45 -06:00
Oded Viner 8b4fd67e17 nvmeof: fetch gateway image from ceph config when not in CR
Make the NVMe-oF gateway image optional in the CR spec.
When not specified, the operator fetches the image from
the Ceph mon config store using the key
mgr/cephadm/container_image_nvmeof. Falls back to the
hardcoded default if the config is unavailable.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-06-11 19:55:16 +03:00
Joshua Hoblitt 41c81a281c Merge pull request #17684 from jhoblitt/maint-remove-dead-osd-updatequeue-clear
osd: remove unused updateQueue.Clear method
2026-06-10 14:20:04 -07:00
Santosh 3396198e9c core: delete stale MDS and RGW pdbs
When RGW and MDS intances are reduce to 1, the older RGW and MDS PDB
instance (with maxUnavailabe=1) are still available. This blocks node
drain when the node, on which the single RGW and MDS instances are
running, is drained.

This PR deletes any stale MDS and RGW PDB when the only 1 MDS and 1 RGW
instances are available.

Signed-off-by: Santosh <sapillai@redhat.com>
2026-06-10 21:04:55 +05:30
Joshua Hoblitt 6a94ae904c Merge pull request #17672 from jhoblitt/maint-remove-dead-verifylabels
test: remove unused label verification helpers
2026-06-09 11:28:05 -07:00
Joshua Hoblitt 8dba034126 Merge pull request #17671 from jhoblitt/maint-remove-dead-container-testhelper
test: remove unused container test helper
2026-06-09 11:27:06 -07:00
Travis Nielsen a9235090f4 Merge pull request #17649 from yuxiang-he/node-label-device-class
osd: Support using node labels for OSD device class assignment
2026-06-08 16:07:07 -06:00
Joshua Hoblitt 50c95d343e osd: remove unused updateQueue.Clear method
The Clear method on updateQueue had no callers anywhere in the repo
(verified with grep, deadcode, and staticcheck). The queue is emptied via
Remove/Pop in practice. Remove the dead method.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 15:01:15 -07:00
Joshua Hoblitt c8ad81a3cf k8sutil: remove unused daemonset helpers
daemonset.go was entirely dead: CreateDaemonSet, DeleteDaemonset,
AddRookVersionLabelToDaemonSet, and GetDaemonsets had no callers anywhere
in the repo (verified with grep, deadcode, and staticcheck). Rook does not
manage any DaemonSets via these helpers. Remove the file.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 14:57:59 -07:00
Joshua Hoblitt 80511ae2dc Merge pull request #17669 from jhoblitt/maint-remove-dead-ismoduleinspec
mgr: remove unused IsModuleInSpec function
2026-06-08 14:51:14 -07:00
Yuxiang He d9357dbfdc osd: support using node labels for OSD device class assignment
Add support for the osd.rook.io/device-class node label to assign
CRUSH device classes to all OSDs on a node.
The operator reads the label during OSD provisioning and
deployment reconciliation. If CR-level deviceClass conflicts
with the node label, the operator will skip reconciling the
node and logs an error.

Resolves: #17131
Signed-off-by: Yuxiang He <yuxiang@dropbox.com>
2026-06-08 13:21:05 -07:00
Joshua Hoblitt ac75488621 test: remove unused label verification helpers
VerifyPodLabels had no callers anywhere in the repo, and it was the only
caller of VerifyAppLabels, which in turn was the only caller of the
checkLabel and combineErrors helpers. Remove the whole dead cluster (and
the now-unused strings, github.com/pkg/errors, and ceph/controller
imports). AssertLabelsContainCephRequirements in the same file remains and
is unaffected. Verified with grep, deadcode, and staticcheck.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 08:54:43 -07:00
Joshua Hoblitt 9efb7f351f test: remove unused container test helper
container.go in the ceph operator test-helper package was entirely dead:
ContainerTestDefinition, its TestContainer method, and the logCommandWithArgs
helper had no references anywhere in the repo (no test or non-test callers,
verified with grep, deadcode, and staticcheck). The package doc comment is
also present on info.go, so removing this file leaves the package documented.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 08:54:43 -07:00
Joshua Hoblitt f8c0d36a50 mgr: remove unused IsModuleInSpec function
IsModuleInSpec has no callers anywhere in the repository (verified with
deadcode and grep). Remove the dead code.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 08:54:43 -07:00
Travis Nielsen de59dcb481 Merge pull request #17546 from Nordix/Sunnatillo/fix-setting-require-osd-release
osd: fix race condition in require-osd-release after rolling upgrade
2026-06-04 09:10:57 -06:00
Sunnatillo f6fa25e844 osd: set require-osd-release from the health monitor
applyUpgradeOSDFunctionality() may run before all OSDs have registered
their new version, leaving require-osd-release unset and the cluster in
HEALTH_WARN.

Check for a single converged OSD version on each health-monitor tick and
set require-osd-release when it changes. The release name is cached to
avoid redundant ceph commands

Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
2026-06-04 16:54:36 +03:00
Joshua Hoblitt d6d0fd8d89 Merge pull request #17648 from jhoblitt/maint-rm-dead-object-funcs
object: remove dead functions and ObjectBuckets sort type
2026-06-03 12:07:15 -07:00
Joshua Hoblitt 1c16afdbc9 Merge pull request #17647 from jhoblitt/maint-rm-dead-object-policy-funcs
object: remove dead EjectPrincipals methods and duplicate AllowedActi…
2026-06-03 11:06:18 -07:00
Joshua HoblittandClaude Sonnet 4.6 ae481f0f43 object: remove dead functions and ObjectBuckets sort type
Remove the following unreferenced symbols:
- (*S3Agent).CreateBucketNoInfoLogging
- (*S3Agent).DeleteBucket (wrapper; callers use the SDK client directly)
- GetBucketsStats
- ObjectBuckets type and its Len/Less/Swap sort.Interface methods

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-03 10:27:40 -07:00
Joshua HoblittandClaude Sonnet 4.6 df30bf66e8 object: remove dead EjectPrincipals methods and duplicate AllowedActions entry
Remove (*BucketPolicy).EjectPrincipals and (*PolicyStatement).EjectPrincipals,
which had no callers outside policy.go. Also drop the duplicate PutBucketVersioning
entry in AllowedActions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-03 09:39:12 -07:00
Artem Muterko 321911b96c object: clobber bucket policy on modify instead of merging
ModifyBucketPolicy merged the caller's statement into the policy fetched
from the bucket, matching by SID. Besides a missing match flag that
appended a duplicate when a SID matched, this preserved any pre-existing
statements on the bucket and reapplied them on every reconcile.

Overwrite the policy with the provided statements instead, so a managed
bucket always ends up with exactly the intended policy and cannot retain
unexpected statements.

Signed-off-by: Artem Muterko <artem@sopho.tech>
2026-06-03 11:04:17 +02:00
Satoru Takeuchi c4f8924beb Merge pull request #17593 from sp98/osd-resize-with-encrypted-host-osds
osd: add cryptsetup resize for encrypted host based osds
2026-06-01 09:24:06 +09:00
Santosh 3e49c9f4cf osd: add cryptsetup resize for encrypted host based osds
when using encryptedDevice:true with host based (non pvc) osds, resizing
the underlying disk and restarting the OSD didn't expand the OSD because
the LUKS encryption layer was not resized.

This PR adds resize capabilities inside the activate container. Full
device stack must be resized: PV → LV → LUKS

Steps:
1. Run pvresize and lvextend to grow the LVM layers.
2. Retrieve the LUKS key from the Ceph config-key store using the
lockbox crednetials already available in the activate container
3. Pass the key explicitly to cryptsetup resize via --key-file.

Signed-off-by: Santosh <sapillai@redhat.com>
2026-05-29 12:09:17 +05:30
Oded Viner 4b5fc9d16a object: add logger for AWS SDK v2 debug signing output
Wire a rookLogger adapter implementing smithy's Logger
interface so that aws.LogSigning output is emitted through
rook's capnslog when debug mode is enabled.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-05-27 20:08:14 +03:00
Blaine Gardner 469b04e1a9 Merge pull request #17572 from OdedViner/remove_asw_v1
object: remove AWS SDK v1 dependency
2026-05-27 10:30:31 -06:00
Travis Nielsen 9774d2de75 Merge pull request #17570 from subhamkrai/add-tls1.3-ciphers
object: add TLS 1.3 cipher suite support for RGW beast frontend
2026-05-27 09:51:33 -06:00
Oded Viner 254965fff1 object: remove AWS SDK v1 dependency
Remove the AWS SDK v1 (github.com/aws/aws-sdk-go)
dependency entirely. All S3 operations now use AWS SDK v2
exclusively.

- Remove the v1 Client field from S3Agent struct and
  rename ClientV2 to Client
- Remove v1 session/client initialization from NewS3Agent
- Update all call sites referencing ClientV2
- Convert integration tests to use v2 API calling
  conventions (context parameter) and smithy error handling
- Remove aws-sdk-go v1.55.8 from go.mod

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-05-27 18:35:54 +03:00
Joshua Hoblitt 8dd1778655 Merge pull request #17561 from jhoblitt/maint-ref-all-containers-by-name-instead-of-index
core: reference all containers in a spec by name instead of index
2026-05-26 12:10:09 -07:00
Joshua Hoblitt 959c223fa8 Merge pull request #17544 from jhoblitt/maint/sync-prometheusrules
helm: update prometheus rules from upstream ceph/ceph; add `cluster` label to all scraped metrics
2026-05-26 12:08:42 -07:00
Joshua Hoblitt d059c351fc core: reference all containers in a spec by name instead of index
This changeset excludes converting _test.go code as there may be a
legitimate reasons (E.g. convenience) for unit test to be sensitive to
ordering.

Related to:
- https://github.com/rook/rook/issues/15291
- https://github.com/rook/rook/pull/16969

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-05-26 10:09:23 -07:00
subhamkrai b70a0c9257 object: add TLS 1.3 cipher suite support for RGW beast frontend
adding new tls ssl_ciphersuites supporting tls 1.3 and the existing,
ssl_cipher supports tls 1.2 and below. Adding, the docs and unit-test
changs as well.

Signed-off-by: subhamkrai <srai@redhat.com>
2026-05-26 20:50:21 +05:30
Blaine Gardner 645aa741eb Merge pull request #17530 from rook/maint-rm-unused-consts-opus-4.7
core: rm unused consts
2026-05-20 09:01:05 -06:00
Travis Nielsen 5f398420fc Merge pull request #17527 from OdedViner/aws_sdk_2_topic
object: migrate sns topic provisioner to aws sdk v2
2026-05-20 07:54:56 -06:00
Oded Viner 81a2cd8833 object: migrate sns topic provisioner to aws sdk v2
migrate the sns-based topic provisioner from aws-sdk-go (v1)
to aws-sdk-go-v2. replace v1 session, credentials, and
request handlers with v2 aws.Config, static credentials
provider, and endpoint resolver. convert the custom ceph rgw
v2 signer hack from a v1 handler swap to a smithy finalize
middleware. update sns api calls to use context-first
signatures, map[string]string attributes, and typed
snstypes.NotFoundException error handling via errors.As.
update unit tests accordingly.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-05-20 13:02:00 +03:00
Travis Nielsen 67395ad5e4 Merge pull request #17545 from sp98/fix-TestAddRemoveNode-unit-test
osd: fix flaky TestAddRemoveNode failure
2026-05-15 13:39:11 -06:00
Sunnatillo 0bd299aa60 build: fix gosec and go vet lint errors for Go 1.26
Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
2026-05-15 21:45:06 +03:00
Santosh 6781d2e58d osd: fix flaky TestAddRemoveNode failure
User RaceFreeFakeWatcher isntead of FakeWatcher in TestAddRemoveNode
function. The test runs c.Start() in a goroutine whch stops the watcher
when done. If mockNodeOrchestrationCompeltion sends a watch ever after,
that, FakeWatcher panics with "send on a closed channel".
RaceFreeFakeWatcher safely ignores the sends on a stopped channel.

Signed-off-by: Santosh <sapillai@redhat.com>
2026-05-15 17:44:03 +05:30
Joshua Hoblitt cc05619dd8 core: add cluster label to all servicemonitor scraped metrics
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-05-14 16:02:34 -07:00
Travis Nielsen 3775bf206a Merge pull request #17407 from cobaltcore-dev/osd-deviceclass-minimal
osd: honor per-device deviceClass in raw-mode prepare and reconcile
2026-05-14 12:04:16 -06:00
Travis Nielsen 52b959e22e Merge pull request #17421 from subhamkrai/add-floating-mon-container-resources
mon: add resource request for mon drbd containers
2026-05-14 11:15:25 -06:00
Joshua Hoblitt 9eec9c730e core: rm unused consts
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-05-14 09:34:52 -07:00
Prabhala Tara Aasrita af03615e97 mon: add watcher for DRBD ConfigMap in TNF deployments
Added a watcher in the cluster controller to detect changes to the DRBD ConfigMap used by floating monitors in TNF deployments. When the ConfigMap is updated, the watcher triggers a CephCluster reconciliation to ensure configuration changes are applied.

Fixes #17338

Signed-off-by: Prabhala Tara Aasrita <taraasrita@ibm.com>
2026-05-14 18:15:32 +05:30
Blaine Gardner 5920f47d58 Merge pull request #17468 from OdedViner/aws_sdk_2_notification
object: migrate notification package to aws sdk v2
2026-05-13 11:35:46 -06:00
Oded Viner f5df592106 object: migrate notification package to aws sdk v2
migrate the notification provisioner and s3ext packages from
aws sdk v1 to v2. the custom DeleteBucketNotification call is
rewritten to manually build and sign the HTTP request using the
v2 v4 signer, since this ceph-specific API has no sdk equivalent.

also fix t.Skipped() -> t.Skip() in notification integration test.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-05-13 19:06:52 +03:00
Travis Nielsen 2898acddfc Merge pull request #17494 from immanuwell/docs-fix-duplicated-words
docs: fix duplicated words in docs and comments
2026-05-12 12:41:18 -10:00
Travis Nielsen 4cf71d9a27 Merge pull request #17472 from texasich/codex-rook-17405
mgr: retry self-signed cert creation on wrapped context deadline errors
2026-05-12 12:37:11 -10:00
Artem Torubarov b41d63788d osd: honor per-device deviceClass in raw-mode prepare and reconcile
Fixes #16834 and #17384. Per-OSD CR deviceClass was ignored in
osd prepare job when reporting the osd config back to the operator,
and in the operator's reconcile override.
Fixed by resolving the per-device class from the CR devices list
in GetCephVolumeRawOSDs and in makeDeployment.

Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-05-11 15:37:16 +02:00
immanuwell c3a9f5fdd9 docs: fix duplicated words in docs and comments
Clean up duplicated words and a typo in object storage docs, comments, and user-facing messages.

Signed-off-by: immanuwell <pchpr.00@list.ru>
2026-05-09 12:50:31 +04:00