Commit Graph
5227 Commits
Author SHA1 Message Date
Travis Nielsen 33cbe3ddda Merge pull request #17794 from rook/dependabot/go_modules/github-dependencies-77d13303f7
build(deps): bump the github-dependencies group with 4 updates and require Go 1.26
2026-06-23 10:31:08 -06:00
Parth Arora 451c3f3d1b Merge pull request #17805 from parth-gr/drbd-mons
core: reduce the floating mon reschdule time
2026-06-23 20:55:48 +05:30
dependabot[bot] 516b46bf34 build(deps): bump the github-dependencies group with 4 updates
Bumps the github-dependencies group with 4 updates: [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2), [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph), [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) and [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator).

Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.103.3 to 1.104.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.103.3...service/s3/v1.104.0)

Updates `github.com/ceph/go-ceph` from 0.39.0 to 0.40.0
- [Release notes](https://github.com/ceph/go-ceph/releases)
- [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md)
- [Commits](https://github.com/ceph/go-ceph/compare/v0.39.0...v0.40.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.91.0 to 0.92.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.91.0...v0.92.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.91.0 to 0.92.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.91.0...v0.92.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/s3
  dependency-version: 1.104.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/ceph/go-ceph
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-version: 0.92.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client
  dependency-version: 0.92.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhamkrai <srai@redhat.com>
2026-06-23 20:32:19 +05:30
parth-gr 9e0b6e5bbe core: reduce the floating mon reschdule time
currently k8s add the default eviction time as 300 sec
setting it to 5 sec for the quick re-schedule

Signed-off-by: parth-gr <partharora1010@gmail.com>
2026-06-23 20:15:56 +05:30
Satoru Takeuchi a8398f9996 Merge pull request #17724 from jhoblitt/osd-activate-skip-rbd-scan
osd: do not scan rbd devices in raw activate fallback
2026-06-23 07:44:02 +09:00
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
Travis Nielsen 63eed4ed47 Merge pull request #17279 from sophotechlabs/test/osd-config-store
test: add unit tests for OSD store config parsing
2026-06-19 08:12:00 -06:00
subhamkrai ad26ebdab0 build: update ceph version to latest v20.2.2
updating the ceph version from v20.2.1 to v20.2.2

Signed-off-by: subhamkrai <srai@redhat.com>
2026-06-17 22:00:11 +05:30
Santosh Pillai 6feb856a9f Merge pull request #17670 from jhoblitt/maint-remove-dead-lockingbool
operator: remove dead code from the operator tree
2026-06-17 15:05:49 +05:30
Travis Nielsen ecadb76e6f Merge pull request #17710 from jhoblitt/object-realm-key-urlsafe
object: generate URL-safe realm access keys
2026-06-16 15:16:22 -06:00
Joshua Hoblitt b1bbfb4bba Merge pull request #17726 from jhoblitt/maint-remove-dead-k8sutil-sweep
k8sutil: remove unused helper functions
2026-06-12 09:10:32 -07:00
Blaine Gardner 3d9e868741 Merge pull request #17727 from jhoblitt/maint-remove-dead-cephclient-funcs
core: remove dead code from pkg/daemon and pkg/util
2026-06-12 10:04:24 -06:00
Joshua Hoblitt b30ba09bda operator: remove unused AddCephVersionLabelToDaemonSet
AddCephVersionLabelToDaemonSet had no callers anywhere in the repo
(verified with deadcode and repo-wide grep); rook applies ceph version
labels to Deployments, Jobs, and object metas, but never to DaemonSets.
The shared addCephVersionLabel helper remains in use by the live
siblings.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-11 15:44:18 -07:00
Joshua Hoblitt 23f4f50bdb csi: remove unused NFSDriverName variable
NFSDriverName was assigned once in the CSI controller reconcile but never
read anywhere in the repo (verified with repo-wide grep and an
exported-symbol audit). Remove the variable, its assignment, and the
nfsDriverSuffix const that only existed to feed it.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-11 15:44:18 -07:00
Joshua Hoblitt ef9761d4df core: remove unused OSDPerfStats type
The OSDPerfStats struct had no references anywhere in the repo (verified
with repo-wide grep and an exported-symbol audit); the code that consumed
this unmarshal target was removed long ago.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-11 15:40:49 -07:00
Joshua Hoblitt 2433565238 multus: remove unused validation test config constructor
NewSharedStorageAndWorkerNodesValidationTestConfig was a wrapper that
simply returned NewDefaultValidationTestConfig() and had no callers
anywhere in the repo (verified with deadcode and repo-wide grep, tests
included). The sibling constructors are all referenced by the multus
validation CLI and remain.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-11 15:40:10 -07:00
Joshua Hoblitt 8df364df98 core: remove unused file helpers from pkg/util
WriteFile and PathToProjectRoot had no callers anywhere in the repo
(verified with deadcode, staticcheck U1000, and repo-wide grep, tests
included). WriteFile has long been superseded by direct os.WriteFile
usage. Drop the now-unused bytes, fmt, and runtime imports; the file's
remaining helpers (WriteFileToLog, CreateTempFile) are still in use.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-11 15:40:10 -07:00
Joshua Hoblitt a7fb77349c Merge pull request #17683 from jhoblitt/maint-remove-dead-util-kmod
core: remove unused kernel module helpers
2026-06-11 14:41:15 -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 573e2f81e7 object: generate URL-safe realm access keys
The realm system user's access and secret keys are generated by
GeneratePassword() and then wrapped in base64. GeneratePassword()
deliberately excludes '/' from the access key character set, but the
base64.StdEncoding wrap reintroduces it: its alphabet contains '/' and
'+', and the 14-character input always produces trailing '='. The
encoded string is the literal key used in S3 requests.

An access key containing '/' breaks AWS SigV4 credential scope parsing
("<access-key>/<date>/<region>/<service>/aws4_request" is split on
'/'), so "radosgw-admin realm pull" against the realm endpoint fails
permanently with "request failed: (22) Invalid argument" (HTTP 400),
and a CephObjectRealm pulling that realm can never reconcile.

This is the dominant cause of the "deploy second cluster rook"
failures in the rgw-multisite-testing canary job: every sampled failure
had a generated access key containing '/' and looped on EINVAL for the
whole 600s wait window, while runs with slash-free keys pulled the
realm successfully.

Encode both keys with base64.RawURLEncoding instead, whose alphabet
(A-Za-z0-9-_, unpadded) is safe in credential scopes, URLs, and shell
arguments. Only newly created realm secrets are affected; existing
secrets are not modified by the reconciler.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-10 15:38:58 -07: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 278453e10c core: remove unused ceph client helper functions
Remove four dead functions from pkg/daemon/ceph/client; none had any
callers anywhere in the repo (verified with deadcode, staticcheck U1000,
and repo-wide grep, tests included):

- auth.go: AuthGetOrCreate
- command.go: ExecuteRBDCommandWithTimeout
- filesystem.go: MarkFilesystemAsDown
- status.go: IsClusterCleanError (IsClusterClean itself remains in use)

No imports become unused by these removals.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-09 15:06:17 -07:00
Joshua Hoblitt b29e89ef67 k8sutil: remove unused helper functions
Remove dead code from the k8sutil package; none of these symbols had any
callers anywhere in the repo (verified with deadcode, staticcheck U1000,
and repo-wide grep, tests included):

- patcher.go: delete file (Patcher type, NewPatcher, Patch)
- replicaset.go: delete file (DeleteReplicaSet)
- customresource.go: WatchCR (the CustomResource type remains in use)
- deployment.go: WaitForDeploymentImage
- job.go: WaitForJobCompletion
- k8sutil.go: GetK8SVersion
- pod.go: ConfigOverrideMount, ConfigOverrideVolume, GetPodLog
- prometheus.go: DeleteServiceMonitor
- service.go: DeleteService
- volume.go: NodeConfigURI, BinariesMountInfo, YamlToVolumes,
  YamlToVolumeMounts, and the BinariesMountPath const (only used by the
  removed BinariesMountInfo)

Now-unused imports are dropped from each file. The shared
deleteResourceAndWait helper remains (still used by DeleteDeployment).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-09 15:05:19 -07:00
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
subham rai 01bf581cb4 Merge pull request #17680 from rook/dependabot/go_modules/golang.org/x/sync-0.21.0
build(deps): bump golang.org/x/sync from 0.20.0 to 0.21.0
2026-06-09 11:17:23 +05:30
dependabot[bot] 1148ed78c3 build(deps): bump golang.org/x/sync from 0.20.0 to 0.21.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/sync/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: subhamkrai <srai@redhat.com>
2026-06-09 10:26:26 +05:30
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 0b6d81d83a core: remove unused kernel module helpers
kmod.go was entirely dead: IsBuiltinKernelModule, LoadKernelModule,
CheckKernelModuleParam, and the getKernelVersion helper had no callers
anywhere in the repo (verified with grep, deadcode, and staticcheck).
Remove the file.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 14:58:10 -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 d12cd1a4b3 operator: remove unused LockingBool / ReconcileCanaries
The ReconcileCanaries field of controllerconfig.Context was set once in
cr_manager.go but never read anywhere, so the LockingBool type backing it
and its Get/Update methods were dead code (verified with grep and
staticcheck). Remove the field, the type, its methods, the initializer,
and the now-unused sync import.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-06-08 08:54:43 -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
Artem Muterko 05da0d1294 test: add unit tests for OSD store config parsing
Signed-off-by: Artem Muterko <artem@sopho.tech>
2026-06-04 15:16:03 +02: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