Commit Graph
5159 Commits
Author SHA1 Message Date
Oded Viner 37e92fd749 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>
(cherry picked from commit 254965fff1)

# Conflicts:
#	go.mod
#	go.sum
2026-05-27 10:38:23 -06:00
subhamkrai e10393f5a2 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>
(cherry picked from commit b70a0c9257)
2026-05-27 15:52:52 +00:00
Joshua Hoblitt d65da7520a Merge pull request #17597 from rook/mergify/bp/release-1.20/pr-17544
helm: update prometheus rules from upstream ceph/ceph; add `cluster` label to all scraped metrics (backport #17544)
2026-05-26 13:50:50 -07:00
Joshua Hoblitt bba4beeae7 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>
(cherry picked from commit d059c351fc)
2026-05-26 19:10:47 +00:00
Joshua Hoblitt 6e96e6b07f core: add cluster label to all servicemonitor scraped metrics
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit cc05619dd8)
2026-05-26 19:09:15 +00:00
Travis Nielsen a03b69ebf5 Merge pull request #17591 from rook/mergify/bp/release-1.20/pr-17525
osd: allow LVM logical volumes as OSD data devices (backport #17525)
2026-05-26 11:37:30 -06:00
Oded Viner 7c64d9d365 ci: bump golang.org/x/net to v0.55.0 to fix GO-2026-5026
The govulncheck CI job is failing on all PRs due to vulnerability
GO-2026-5026 in golang.org/x/net v0.54.0. Bump golang.org/x/net to
v0.55.0 to resolve it.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit bf941235fd)
2026-05-26 10:53:40 -06:00
Santosh c64524b96d osd: allow LVM logical volumes as OSD data devices
remov restrictions that prevented LVM logical volume from being
provisioned as OSDs. LV devices with a metadatadevice were rejected at
the filtering stage. LV devices without one were incorrectly being
routed to ceph-volume raw mode which was resuting in error. This PR:

- removes metadatadevice restriction on LV devices.
- Adds LVM time check to isSafeToUseRAWMode to prevent raw mode on lvm

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit c6d48178dd)
2026-05-26 15:47:16 +00:00
subhamkrai ec3953ea34 csi: update csi-operator to v1.0.0
This commit update the csi-operator to latest v1.0.0.
we need to manually patch the csi drivers with the new serviceAccount
name that are being creating based on the latest ceph-csi-operator
release v1.0.0 where serviceAccount are being separate from csi-operator
chart.

co-authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 06452991bf)
2026-05-21 15:22:41 -06:00
Travis Nielsen 8abf77d763 Merge pull request #17566 from rook/mergify/bp/release-1.20/pr-17527
object: migrate sns topic provisioner to aws sdk v2 (backport #17527)
2026-05-20 10:36:35 -06:00
Joshua Hoblitt 1efea0123c core: rm unused consts
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9eec9c730e)
2026-05-20 15:03:03 +00:00
Oded Viner 9d91a725a0 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>
(cherry picked from commit 81a2cd8833)
2026-05-20 13:55:22 +00:00
Travis Nielsen f7b0aee51a Merge pull request #17550 from rook/mergify/bp/release-1.20/pr-17547
build: fix gosec and go vet lint errors for Go 1.26  (backport #17547)
2026-05-15 14:17:30 -06:00
Santosh 840e15a22b 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>
(cherry picked from commit 6781d2e58d)
2026-05-15 19:40:08 +00:00
Sunnatillo a9c1805ae3 build: fix gosec and go vet lint errors for Go 1.26
Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
(cherry picked from commit 0bd299aa60)
2026-05-15 19:26:04 +00:00
Santosh 5916722cff pool: skip base rule creation of pools exit
createREplicatedPoolForApp creates a base Crush rule (named after the
pool) on every reconcile, even if the pool already exists and uses a
suffixed rule ( eg pool_host_ssd). This causes orphaned rules to
reappear after every operator restart, immediately after
CleanupUnusedCrushRules deletes them.

This PR ensures that the base rule is created only if the pool does not
exist yet.

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit df0f4e6c99)
2026-05-15 14:14:36 +00:00
Artem Torubarov 3872e1d0b7 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>
(cherry picked from commit b41d63788d)
2026-05-14 18:05:09 +00:00
subhamkrai cd6a330d54 mon: add resource request for mon drbd containers
adding missing resource request for mon drbd containers
log-collector and shut-down-app and update the unit test
to validate.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit d88e287726)
2026-05-14 17:16:04 +00:00
subhamkrai 536909a58b pool: add stripe_unit with erasure-code-profile set
this commit adds flag stripe_unit for the command
ceph osd erasure-code-profile set [flags]. This key
increase perfomance for ec pool. The default value
is 4kib/4096 bytes.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 9fb0582dd6)
2026-05-14 16:38:55 +00:00
Prabhala Tara Aasrita 2821bd1bb4 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>
(cherry picked from commit af03615e97)
2026-05-14 15:52:47 +00:00
Oded Viner 09812ac966 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>
(cherry picked from commit f5df592106)
2026-05-13 17:37:22 +00:00
mergify[bot] 3504b2b827 Merge pull request #17514 from rook/mergify/bp/release-1.20/pr-17502
core: skip crush rule cleanup if no pools exist yet (backport #17502)
2026-05-12 23:39:45 +00:00
Travis Nielsen 31bbc393eb Merge pull request #17467 from rook/mergify/bp/release-1.20/pr-17453
osd: detect encryption label from dmcrypt path (backport #17453)
2026-05-12 13:36:16 -10:00
mergify[bot] 7d0785d635 Merge pull request #17463 from rook/mergify/bp/release-1.20/pr-17176
csi: move csi management to admin (backport #17176)
2026-05-12 23:17:38 +00:00
Travis Nielsen 2cd4215f8f Merge pull request #17517 from rook/mergify/bp/release-1.20/pr-17472
mgr: retry self-signed cert creation on wrapped context deadline errors (backport #17472)
2026-05-12 13:12:23 -10:00
subhamkrai a9d29bdec6 csi: move csi management to admin
Going forward, admin will manage the csi operator
CR's and rook will only manage Ceph Connection cr
and client Profile cr.

The old csi driver is completely removed from Rook
and can no longer be used starting in Rook v1.20.

The upgrade guide will contain the needed transition steps
for managing the csi operator settings.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 4eefad42e8)
2026-05-12 12:49:21 -10:00
immanuwell 551d62a2a2 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>
(cherry picked from commit c3a9f5fdd9)
2026-05-12 22:41:48 +00:00
texasich 091ed17fd8 mgr: retry self-signed cert creation on wrapped deadline errors
Signed-off-by: texasich <texasich@users.noreply.github.com>
(cherry picked from commit beb6c0f373)
2026-05-12 22:38:05 +00:00
Santosh f09555f1a8 core: skip crush rule cleanup if no pools exist yet
During the initial cluster setup, CleanUnusedCrushRules() runs after MGR
startup but before any pools are created (if user does not create the
.mgr pool along with the cephCluster manifest). It deletes the default
replicated_pool since no pool references it.

This leaves the cluster in a state if Zero crush rules. When the MGR
tries to start the device_health_metris during this window, thne it
fails to find the crush rule and crashes.

Skip the cleanup when no pools exists yet, since there is nothing
meaninful to cleanup.

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit 1c1d6cf261)
2026-05-12 14:24:23 +00:00
subham rai 9b5b80b172 Merge pull request #17511 from rook/mergify/bp/release-1.20/pr-17503
nvmeof: add sys_admin to scc allowedcapabilities for gateway pods (backport #17503)
2026-05-12 15:39:54 +05:30
Oded Viner 67520301ac nvmeof: add sys_admin to scc allowedcapabilities for gateway pods
the nvmeof gateway requires privileged containers with
sys_admin capability. the rook-ceph scc only allowed mknod,
causing pod creation to fail on openshift with:
"unable to validate against any security context constraint"

add sys_admin to allowedcapabilities in the helm chart sccs
and the go scc helper. this does not affect other daemons
(osd, rgw, mgr, mon) since they do not request sys_admin.

the operator-openshift.yaml example already includes
sys_admin, so this aligns the helm charts to match.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit f8c1c99cb4)
2026-05-11 22:04:16 +00:00
Oded Viner 7b4313ffbb build: bump golang.org/x/net to fix govulncheck ci failure
bump golang.org/x/net from v0.52.0 to latest patched version
to resolve known http2 vulnerability flagged by govulncheck.

the vulnerable call path is:
  object.debugHTTPClient.Do
  -> httputil.DumpRequestOut
  -> http2.Transport.RoundTrip

this is a pre-existing issue blocking ci on all pull requests.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 20fa0128f5)
2026-05-11 09:25:07 +00:00
Prabhala Tara Aasrita 771e377cc7 mon: check node existence on every health check iteration
Previously, shouldFailoverMonImmediately() was called only when a mon first went out of quorum. If the node gets deleted after the timeout starts, it does not get detected until the timeout expires. Moved the call outside the timeout initialization block so it runs on every health check iteration and detects node deletion immediately.

Fixes #15953

Signed-off-by: Prabhala Tara Aasrita <taraasrita@ibm.com>
(cherry picked from commit aeae61e5be)
2026-05-07 06:03:40 +00:00
subhamkrai 3445e2be3a rgw: add option for tls and cipher in objectstore
this commit add option in the ceph objecstore CR
to configure TLS profile and TLS ciphersuite for
rgw beast.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 01ef98c1e3)
2026-05-06 17:13:59 +00:00
Santosh 10116d7b41 osd: detect encryption label from dmcrypt path
Detect OSD encryption from the dmcrypt block path in `getOSDInfo` as a
fallback when the `encrypted` label is missing on pre-label deployments.

Include `osd.Encrypted` in the label check in `makeDeployment` so the
label reflects the actual OSD state on upgrade.

Fixes a bug where upgrading to a Rook version with the `encrypted` label
would set the label to `false` on already-encrypted OSDs, because the
label didn't exist yet and `getOSDInfo` defaulted to `false`.

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit fc9e3b54f3)
2026-04-30 08:08:21 +00:00
Travis Nielsen b9726d4834 Merge pull request #17456 from rook/mergify/bp/release-1.20/pr-17444
object: migrate bucket provisioner to aws sdk v2 (backport #17444)
2026-04-29 14:42:29 -06:00
Rohan Gupta 5ce77b0d94 exporter: set correct DNSPolicy for rook-ceph-exporter
rook-ceph-exporter should use DNSPolicy ClusterFirstWithHostNet when
hostNetwork is enabled

Signed-off-by: Rohan Gupta <rohgupta@redhat.com>
(cherry picked from commit 17873d3af2)
2026-04-29 18:11:46 +00:00
Oded Viner d11ef74a9b object: migrate bucket provisioner to aws sdk v2
migrate bucket provisioner from aws sdk v1 to v2.

replace awserr.Error type assertions with smithy.APIError
using errors.As for v2-style error handling.

switch setBucketPolicy and setBucketLifecycle to use
the v2 s3 client (ClientV2) directly with context.

replace v1 s3 types (BucketLifecycleConfiguration,
GetBucketLifecycleConfigurationOutput) with v2 equivalents
from s3types and s3v2 packages.

add cmpopts.IgnoreUnexported to cmp.Diff calls to handle
unexported noSmithyDocumentSerde fields in v2 sdk types.

add nil guard on lifecycle output before accessing rules
to prevent nil dereference when get returns an error.

depends on #17414

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 5ba3e1a2c0)
2026-04-29 16:24:17 +00:00
Oded Viner fe9d515ced object: migrate bucket policy methods to aws sdk v2
migrate PutBucketPolicy and GetBucketPolicy to use aws sdk v2
client.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 88e0047d9b)
2026-04-28 11:45:57 +00:00
Travis Nielsen 03b9b8b1b0 Merge pull request #17427 from rook/mergify/bp/release-1.20/pr-17282
pool: clean up unused crush rules (backport #17282)
2026-04-27 13:32:01 -06:00
Travis Nielsen e23819428e Merge pull request #17435 from rook/mergify/bp/release-1.20/pr-17342
object: migrate s3agent object methods to aws sdk v2 (backport #17342)
2026-04-27 10:27:59 -06:00
Oded Viner 1332e79115 security: grant scc to rook-ceph-nvmeof service account
the rook-ceph-nvmeof service account is not listed in the
securitycontextconstraints users, causing cephnvmeofgateway
pods to fail on openshift. add the service account to the
scc in the helm charts, go scc builder, and test namespace
substitution.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 7f3e2ace27)
2026-04-27 15:50:44 +00:00
Oded Viner 9341b3dcfa object: migrate s3agent object methods to aws sdk v2
migrate PutObjectInBucket, GetObjectInBucket, and
DeleteObjectInBucket to use aws sdk v2 client.
replace v1 awserr error handling in DeleteObjectInBucket
with v2 typed errors (errors.As).
remove unused v1 awserr import.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 2cb714dabd)
2026-04-27 15:48:57 +00:00
Asish Kumar 0b3605dd84 pool: clean up unused crush rules
Clean up stale CRUSH rules after the Ceph mgr starts so rules left behind by pool failure-domain or device-class changes do not accumulate indefinitely.

The cleanup is guarded by a package-level RWMutex. Pool create and update paths hold the read lock while creating and assigning CRUSH rules, while cluster-wide cleanup holds the write lock before listing pools and deleting unused rules. This keeps pool reconciles parallel with each other while preventing cleanup from deleting a rule that another reconcile has just created but not yet attached to a pool.

Keep direct pool-delete cleanup for the pool's current CRUSH rule, make the cluster-wide cleanup best-effort across all unused rules, and add an operator-level ROOK_DELETE_UNUSED_CRUSH_RULES setting for clusters that need to leave unused custom rules in place.

Document the operator and Helm settings, regenerate the Helm chart docs, and add a pending release note for the default cleanup behavior.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
(cherry picked from commit 24a35e4e74)
2026-04-24 22:32:15 +00:00
Santosh cbe544ec21 core: remove newlines from liveness probe scripts
Strip unnecessary leading and trailing newlines from osdLivenessProbeScript and livenessProbeScript raw string literals in spec.go

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit 925acb3e92)
2026-04-24 13:44:46 +00:00
Prabhala Tara Aasrita f1be5f1a1c osd: fix KMS log error format specifier
During OSD provisioning, the KMS error log incorrectly uses logger.Error() instead of logger.Errorf(), causing the format specifier %q to appear in the logs. Changed logger.Error to logger.Errorf to fix the same.

Signed-off-by: Prabhala Tara Aasrita <taraasrita@ibm.com>
(cherry picked from commit 85ee8631cf)
2026-04-24 08:39:55 +00:00
Travis Nielsen 9d0586d277 Merge pull request #17408 from rook/mergify/bp/release-1.20/pr-17382
mon: fix floating mon validation in TNF deployments (backport #17382)
2026-04-23 16:01:34 -06:00
Lumir Sliva 396ef531e1 mon: relax balanced CRUSH weight check for stretch mode
Ceph relaxed the stretch mode CRUSH weight check in ceph/ceph#66580 to
allow weights within 10 percent of each other. This change is available
in Ceph Umbrella and was backported to tentacle v20.2.2 via ceph/ceph
number 67790. The squid backport is still pending.

Signed-off-by: Lumir Sliva <61183145+lumir-sliva@users.noreply.github.com>
(cherry picked from commit 27f95f2feb)
2026-04-23 18:05:50 +00:00
Prabhala Tara Aasrita 5af4ecc44f mon: fix floating mon validation in TNF deployments
The floating mon in a TNF cluster is designed to share a node with a pinned mon. Fixed the pre-cluster start evaluation logic to allow the same when allowMultiplePerNode is set to false.

Signed-off-by: Prabhala Tara Aasrita <taraasrita@ibm.com>
(cherry picked from commit 8e205b194c)
2026-04-22 15:37:03 +00:00
David Orman 31722a2041 osd: fix CRUSH device class not applied during OSD re-discovery
When an OSD is purged and reprovisioned, it comes back without the
correct CRUSH device class. NVMe devices configured with
deviceClass: nvme in the CR end up as ssd.

Root cause: the operator sets ROOK_OSD_CRUSH_DEVICE_CLASS on prepare
jobs but not on OSD deployments. During re-discovery
(GetCephVolumeRawOSDs), the daemon reads this env var, finds it
absent, and falls back to auto-detected deviceType which returns ssd
for NVMe.

Fix: add crushDeviceClassEnvVar(osd.DeviceClass) to the OSD
deployment spec in spec.go, alongside the existing
dataDeviceClassEnvVar. Existing deployments pick up the new env var
on operator reconciliation without manual intervention.

Fixes #17227
Signed-off-by: David Orman <ormandj@corenode.com>
(cherry picked from commit 1357d71177)
2026-04-21 12:21:15 +00:00