Commit Graph
1552 Commits
Author SHA1 Message Date
Joshua Hoblitt d31acaa26a ci: check the links in AGENTS.md
`AGENTS.md` is almost entirely links into `Documentation/`, which is what keeps
it from duplicating the documentation and drifting away from it. That only works
while the links resolve, and nothing checked them: the link checker walks
`Documentation/` alone, so a moved page would leave `AGENTS.md` pointing at
nothing and silently misdirect its reader.

Include it in the files the link checker walks.

The other markdown files in the repository root are left out on purpose. Several
of them already contain dead external links, and adding them here would fail the
nightly job for reasons unrelated to this change.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9277239590)

# Conflicts:
#	tests/scripts/check-markdown-links-internal.sh
2026-08-06 19:55:07 +00:00
Joshua Hoblitt d82cfb9d4e test: exercise multisite chart values in CephHelmSuite
Configure the CephHelmSuite object store as an RGW multisite zone so the
chart's CephObjectRealm, CephObjectZoneGroup, and CephObjectZone templates
are exercised on a Helm install. The operator must reconcile the realm,
zone group, zone, and store to Ready, which the existing install check
already gates on via the RGW pod count.

The realm/zone group/zone and shared-pool layout mirror the fixture in
tests/integration/object/util/sharedstore: a zone backed by explicit
CephBlockPools referenced through sharedPools.poolPlacements. The rgw pools
are appended to the block pools already configured for CSI, and are torn
down along with the multisite CRs when the default storage CRs are removed.

Gate the multisite configuration behind a new UseMultisiteObjectStore
setting enabled only for CephHelmSuite. The other Helm-based suites keep the
plain object store; the upgrade suite in particular installs an older base
chart that lacks the multisite templates and cannot resolve a zone-based
store.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 8a72d80127)

# Conflicts:
#	tests/integration/ceph_helm_test.go
2026-07-13 13:23:11 -07:00
mergify[bot] 21304d6642 Merge pull request #17911 from rook/mergify/bp/release-1.20/pr-17875
csi: update csi-operator version to v1.0.4 (backport #17875)
2026-07-07 17:36:51 +00:00
subhamkrai 6b106fc03f csi: update csi-operator version to v1.0.4
Updating csi-operator to latest v1.0.4 and
updating the required doc changes as well.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit a3e02e607d)
2026-07-07 11:15:12 -06:00
mergify[bot] e16ae7d32e Merge pull request #17903 from rook/mergify/bp/release-1.20/pr-17822
ci: convert integration and canary CI from minikube to kind (backport #17822)
2026-07-07 16:35:31 +00:00
Joshua Hoblitt 47f91adcb6 ci: fix broken-pipe race in find_extra_block_dev
find_extra_block_dev piped find_extra_block_devs into head -1. Since
find_extra_block_devs prints every eligible disk and ends with echo
"$devs", head closes the pipe after the first line and the producer's
echo races into SIGPIPE (echo: write error: Broken pipe), failing the
command substitution under pipefail/errexit.

The race only fires reliably now that the runners present two data disks
(sdb and sdc), so find_extra_block_devs emits multiple lines; with a
single disk the one-line output almost never triggered it.

Read the producer to completion with mapfile via process substitution
and return the first element, mirroring find_second_block_dev, so there
is no downstream head to close the pipe early.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 7079c9bf62)
2026-07-07 15:39:31 +00:00
Joshua Hoblitt 8db438b8e3 ci: convert integration and canary CI from minikube to kind
The integration and canary suites ran on a single-node minikube
`driver: none` cluster, where the kubelet ran directly on the GitHub
runner, so the host docker daemon doubled as the cluster runtime and
host block devices and host paths were directly visible to pods. Replace
that with a kind cluster.

Every suite creates its cluster through the shared
integration-test-setup-cluster-resources composite action, so the
conversion is centralized there and converts the smoke, object, helm,
keystone, multi-cluster, upgrade, on-release, nightly, encryption-KMS and
all canary jobs at once.

- Replace the setup-minikube step with helm/kind-action, selecting the
  kubernetes version via the kindest/node image tag and creating a
  single-node cluster from a new kind config (kind pinned to v0.32.0 for
  reproducibility).
- Drop the cri-dockerd install; kind nodes use their built-in containerd.
- Add a kind config that bind-mounts the host /dev, /var/lib/rook and
  /run/udev into the node so the existing host-based disk-prep helpers
  (use_local_disk*, create_partitions_for_osds, blockDevicePV.sh,
  localPathPV.sh, ...) keep working unchanged: devices and partitions
  created on the host appear in the node and in the OSD pods that
  hostPath-mount the node /dev, and ceph-volume can read the host udev
  database it needs to inventory disks.
- Prepare the kind node for the host-level operations rook runs against the
  underlying host: remount /sys read-write so CSI's kernel RBD mapping
  (`rbd map --device-type krbd`, which writes /sys/bus/rbd) works, and install
  lvm2 and cryptsetup, which rook runs in the node's mount namespace to
  provision LVM- and encryption-backed OSDs. kindest/node images provide none
  of this; the minikube driver:none runner host did.
- Route the Service and pod CIDRs from the runner to the kind node so
  host-side tests (the `go test` process runs on the runner) can reach
  in-cluster ClusterIPs, e.g. an S3 request to the RGW service. With minikube
  driver:none the runner already shared the cluster network.
- Load locally built images into the cluster. Under minikube `driver: none`
  the built image was already in the cluster runtime; under kind it must be
  imported, so build_rook and create_helm_tag now import their images into
  each node's containerd through a new load_image_into_cluster helper (via the
  node's ctr, which avoids the kind/kindest-node containerd-config version
  skew that breaks `kind load docker-image`).
- Point Vault's kubernetes-auth at the in-cluster API endpoint
  (kubernetes.default.svc) instead of the kubeconfig server URL: kind exposes
  that as https://127.0.0.1:<port>, unreachable from the in-cluster Vault pod,
  so OSD encryption-key retrieval via k8s-auth failed.
- Replace the remaining direct minikube references in the canary workflow: a
  `minikube kubectl` call and the external-cluster topology values.
- Adapt host-name assumptions that only held under driver:none: resolve the
  disk-cleanup job by the k8s node name rather than the runner hostname, and
  let kind-action ignore post-job cluster-teardown failures (the runner is
  ephemeral; nvme/multus devices can wedge `docker rm` of the node).
- Update stale comments that described the CI environment as minikube.
- Move the multus integration test's kind config under tests/config too, so
  both kind cluster configs live in one place.

create-dev-cluster.sh and other local-dev tooling are intentionally left on
minikube.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit d59abb1956)
2026-07-06 17:48:24 -07:00
Joshua Hoblitt ac686a02c8 docs: fix typos and grammar in code comments
Fix duplicate words, incorrect articles (a/an), it's/its, and other small
grammar mistakes in Go comments and user-facing messages across pkg/, cmd/,
and tests/.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit c0eb360041)
2026-07-01 09:23:27 -07:00
Joshua Hoblitt 093e3e322f ci: provision extra disks when the runner starts with none
find_extra_block_devs reads the runner's current extra disks with
`lsblk ... | egrep -v "($boot_dev|loop|nbd)"` to decide how many more to
provision. When the runner has no extra disk, that egrep matches nothing
and exits 1; under the script's `set -eo pipefail` the assignment aborts
the function before it ever calls create_extra_disk, so callers get zero
disks and fail with "expected >= N extra disks, found 0" (or a bare /dev/
path) on those runners.

Guard that first read with `|| true` (as the adjacent device-count line
already is) so an empty result means "no extra disks yet" and the
provisioning path runs. The second read, after create_extra_disk, is left
strict on purpose: if provisioning produced no disk, egrep's non-zero exit
should abort there rather than silently return nothing.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 029b13b000)
2026-06-30 15:13:29 +00:00
Joshua Hoblitt c724d02b84 test: document the object suite test conventions
Add a conventions doc and conversion playbook so the remaining old-style
object tests (store lifecycle, notifications, COSI, bucket rw/quota/policy/
lifecycle) can be converted to this pattern mechanically.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 8ee5d92022)
2026-06-29 20:33:44 +00:00
Joshua Hoblitt d4d9b4c7f8 test: rework the shared-store user/bucket/topic suites
The object store user (caps/keys/opmask), bucket-owner, and bucket topic
tests already shared a CephObjectStore but polled with count-based
utils.Retry behind a wide entry signature. Move them onto the wait4 toolkit
and a slim (t, k8sh, store) signature: each is an ordered t.Run script using
typed clients and watch-based waits, with per-package check helpers for
repeated verification. Extend the shared store fixture to provision the
realm/zonegroup/zone pools and serve TLS, build its rgw admin and SNS clients
through the consolidated util/client package (replacing the separate
admin/sns/s3 packages), and run every package in both the TLS and non-TLS
passes (now separate parallel jobs).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit eb404e6677)
2026-06-29 20:33:44 +00:00
Joshua Hoblitt 29af430739 test: add the object suite test util toolkit
Add the shared helpers the object test packages build on:
- wait4: watch-based Assert/Require waiters (Create/Delete/Condition/Absent)
  that block on Kubernetes watch events rather than fixed-interval polling,
  plus Eventually for non-k8s state (rgw admin/S3/SNS), a pod-log waiter, and
  the readiness predicates used with them.
- secrets: verification of the Secret references CRDs publish in status.
- fixture: create-with-t.Cleanup helpers for pure-cleanup resources, and
  constructors for ObjectBucketClaim test resources.
- client: rgw admin and SNS client builders, S3 credentials/endpoint, and the
  store's TLS cert plus a verification-skipping HTTP client.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit b59101d8e8)
2026-06-29 20:33:44 +00:00
Joshua Hoblitt dcd4dfb2bd docs: fix function comments to match their declaration names
Several godoc comments led with a stale or incorrect identifier, left
over from renames, exported/unexported changes, copy-paste between
sibling declarations, or plain typos. As a result the documented name no
longer matched the function, method, type, or var it describes. Correct
each leading word to the name of the declaration it documents.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 49612461a4)
2026-06-29 19:04:45 +00:00
Joshua Hoblitt 636b9589b3 ci: capture build_rook stderr so the network-retry can see it
build_rook() captures the make output into $o and inspects it for
transient network errors (connection reset, INTERNAL_ERROR, 503, 500)
to decide whether to retry the build. The capture was stdout-only,
but go and make write those errors to stderr, so $o never matched any
retry case. A transient module-proxy failure (e.g. proxy.golang.org
returning INTERNAL_ERROR while downloading modules) therefore fell
through to the "valid failure" branch and failed the job in the build
step, before the integration test even ran.

Redirect stderr into the captured output (2>&1) so the existing retry
logic actually triggers on network failures.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 04734d7150)
2026-06-26 19:27:43 +00:00
Joshua Hoblitt 28517376f8 ci: replace loop devices with iscsi in canary osd tests
The raw-disk-with-object, osd-with-metadata-device, and pvc canary jobs
used loopback devices to supply an extra block device beyond the single
spare disk a GitHub runner provides. Loop devices behave differently
from real block devices -- Rook gates them behind
ROOK_CEPH_ALLOW_LOOP_DEVICES and special-cases them in the OSD daemon --
so exercising core scenarios on them is less realistic than using real
SCSI disks.

Provision the extra device(s) over iSCSI (LIO) instead, reusing the
existing create_extra_disk helper: it now creates N LUNs, the new
find_extra_block_devs and find_second_block_dev helpers enumerate them,
and deploy_cluster gains a two_raw_disks mode. The three jobs now run
entirely on real disks, and the canary CI no longer creates loop devices
or relies on the loop-device test helpers.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 4b7d769102)
2026-06-25 05:26:00 +00:00
mergify[bot] 1858e99437 Merge pull request #17818 from rook/mergify/bp/release-1.20/pr-17732
ci: harden CephSmokeSuite against CSI cold-start and teardown flakes (backport #17732)
2026-06-24 16:04:14 +00:00
Joshua Hoblitt 87111171f2 ci: retry snapshot controller and crd manifest fetches
Installing the external-snapshotter CRDs and controller runs several
kubectl commands against raw.githubusercontent.com manifest URLs with
no retry, and getManifestFromURL did not retry either, nor did it check
the HTTP status code, so an error page could be fed to kubectl as a
manifest. Transient fetch failures showed up in TestCephSmokeSuite as
NFS test failures during snapshot CRD installation.

Retry the URL-based kubectl invocations and the manifest download, fail
on non-200 responses, and bump the snapshot controller wait in the file
test from 75s to 450s to match the block test since the
snapshot-controller image pull can take longer in CI.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit c85643692e)
2026-06-24 15:58:30 +00:00
Joshua Hoblitt c7e37a4fdf ci: avoid panic in object store deletion assertion
When the deletion condition never appeared within the retry window,
assertObjectStoreDeletion recorded the failure with assert and then
dereferenced the nil condition, panicking and aborting the whole test
binary without teardown or operator log collection. Observed in a
TestCephSmokeSuite run as a SIGSEGV right after
'delete_object_store ... Should not be: 10'.

Use require for the timeout and a nil check before dereferencing the
condition, and extend the retry window from 30s to the standard retry
budget since the operator can take longer to set the deletion condition
when its reconcile queue is busy.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 76ec455402)
2026-06-24 15:58:30 +00:00
Joshua Hoblitt f50b3261b2 ci: tolerate transient errors while waiting for block image count
retryBlockImageCountCheck aborted the whole wait on the first rbd ls
failure. The listing runs through the toolbox under a timeout and can
fail transiently right after the pool is created (observed as exit
status 124 while the pool PGs were still being created), turning a
recoverable delay into an immediate test failure.

Keep retrying on listing errors and double the retry budget: when the
first provisioning attempt fails, the external-provisioner sidecar
backs off exponentially and its next attempt can be several minutes
out, which the previous 275s budget could not ride out.

This commit also bumps the snapshot controller wait in the block test
from 75s to 450s; the snapshot-controller image pull can take longer
than 75s in CI.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 12a2c0f905)
2026-06-24 15:58:29 +00:00
Joshua Hoblitt 36de8f7c97 ci: wait for csi driver deployments after cluster install
The csi-operator creates the driver deployments asynchronously, so the
ctrlplugin pods may still be pulling images when the ceph daemons are
already up and the integration tests start. If a PVC is created before
the provisioner is ready, the first provisioning attempt fails (the
mounted csi config may also not be visible to the driver yet) and the
external-provisioner sidecar enters exponential backoff, delaying the
volume creation by several minutes and timing out the test wait.

Observed in TestCephSmokeSuite runs as 'timed out waiting for image
count to reach 1' with the rbd ctrlplugin pod cold-starting mid-test
and the first CreateVolume failing with 'failed to fetch monitor list
using clusterID'. In one run the second provisioning attempt landed two
seconds after the test wait expired.

Wait for the ctrlplugin deployments of the enabled drivers to be ready
before declaring the cluster installed.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 53ab1c5136)
2026-06-24 15:58:29 +00:00
Joshua Hoblitt d1e4f13b17 ci: extend the multisite replication read budget
The bucket sync checkpoint confirms the bucket's data sync markers are
caught up at the RADOS level, but the reading RGW can briefly serve 404
for the freshly synced object until it refreshes its view. The post-
checkpoint read was given only a 60s budget, which is occasionally too
short; give it 180s so a transient RGW serving lag does not fail the
test.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit e9b59476a6)
2026-06-24 15:58:15 +00:00
Joshua Hoblitt 34b4d6580a ci: converge wedged multisite secondary before asserting sync
After the sync-readiness gate was added, rgw-multisite-testing still
fails ~25% of master-push runs, now in the new "wait for multisite
sync to be established" step. Diagnosis from the failure diagnostics:
the secondary zone never initializes metadata sync. For the whole
600s its sync status reports "metadata sync failed to read sync
status: (2) No such file or directory".

The master pushes each new RGW configuration period to the secondary
RGW, but until the realm system user is resolvable locally on the
secondary that push is received unauthenticated and rejected with
HTTP 403. The master then re-pushes the same period unchanged every
30s, so a secondary that starts out unable to resolve the user never
recovers. In passing runs the same push later authenticates as
realm-a-system-user and returns 200, at which point the zone converges;
in failing runs it is 403 for the entire window (zero successful
pushes). The generated keys are clean and identical on both clusters,
so this is a fresh-zone bootstrap race in the gateway, not a key
problem.

Rather than wait out a doomed timeout, nudge the secondary to converge
when its metadata sync has not initialized within a couple of minutes:
pull the latest period directly (outbound auth works, so this does not
depend on the rejected inbound push) and restart the secondary RGW so
it re-runs metadata sync init against the now-ready master. This is
what ceph's own multisite QA does (restart zone gateways after the
period is committed). Healthy setups pass the first check in seconds,
so the nudge only runs when sync is genuinely stuck.

Also guard wait_for_sync_status against matching empty output from a
failed exec, and pass the realm/zonegroup/zone to the diagnostics
sync-status dump so the primary cluster no longer reports the unrelated
default zone.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 325d314dd7)
2026-06-24 15:58:15 +00:00
Joshua Hoblitt 093bd5c4c4 test: add Eventually polling helper for test setup waits
The keystone auth suite installs cert-manager and trust-manager with
helm --wait and then immediately applies Issuer, Certificate, and
Bundle resources. helm --wait returns when the webhook deployments
report ready, but the webhook service endpoints may not be programmed
on the apiserver's node yet, so the apply is rejected with 'failed
calling webhook ... connect: connection refused' and the suite fails
before any test runs. This is currently the dominant failure mode of
the keystone suite, seen on master and on PRs that cannot have caused
it (dependabot github-actions bumps, mergify backports).

Add utils.Eventually, a timeout-based polling primitive intended as
the shared replacement for hand-rolled retry loops in test code:

- cond is func(ctx) error rather than func() bool, so each failed
  attempt logs its reason via t.Logf and the final timeout error wraps
  the last attempt's error.
- cond runs on the calling goroutine and receives a context carrying
  the overall deadline, so cooperative operations stop at the deadline
  instead of overrunning it. It is never run on another goroutine: a
  hung attempt would keep executing concurrently with its retry, and
  require's FailNow is unsafe off the test goroutine.
- utils.AttemptTimeout decorates a cond with a per-attempt deadline
  for operations that can hang but would succeed if canceled and
  retried. The bound is cooperative; conds that cannot honor a context
  must be bounded at the operation level instead.

Expose it as a K8sHelper.ApplyWithRetry method that retries kubectl
apply until the webhooks accept connections, and use it for the
keystone setup applies instead of failing the suite on the first
attempt.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 4fb04e638d)
2026-06-23 17:40:17 +00:00
Oded Viner 448154e0d3 security: add example NetworkPolicy CRs for Ceph operand pods
Add a single example YAML with NetworkPolicy definitions
for all Ceph operand pods (mon, osd, mgr, mds, exporter,
osd-prepare, crashcollector, tools).
Users can apply these policies to restrict egress/ingress
traffic for Rook-Ceph daemon pods.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 9dc70051a8)
2026-06-17 18:54:41 +00:00
subhamkrai e2600812e5 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>
(cherry picked from commit ad26ebdab0)
2026-06-17 17:01:15 +00:00
mergify[bot] f0fee18018 Merge pull request #17772 from rook/mergify/bp/release-1.20/pr-17711
ci: make rgw-multisite-testing wait for multisite readiness (backport #17711)
2026-06-16 21:56:39 +00:00
mergify[bot] 88b99197ea Merge pull request #17771 from rook/mergify/bp/release-1.20/pr-17712
ci: fix multus integration test setup flakes (backport #17712)
2026-06-16 21:37:26 +00:00
mergify[bot] c10d6f234b Merge pull request #17769 from rook/mergify/bp/release-1.20/pr-17722
ci: fix toolbox exec race in validate_cluster.sh (backport #17722)
2026-06-16 21:36:10 +00:00
Joshua Hoblitt 209a915b98 ci: make rgw-multisite-testing wait for multisite readiness
The rgw-multisite-testing canary job has been chronically flaky
(roughly a third of recent canary runs, including on master and
release branches). Job logs and collected artifacts show two recurring
mechanisms, neither of which is addressed by bumping timeouts:

1. Every recent failure of the "write an object" step died within
   ~16s: the very first "s3cmd mb" against the primary zone got
   ECONNREFUSED three times across the 10s retry window. The RGW
   process never crashed; RGWs pause their HTTP frontends to reload
   the realm whenever the RGW configuration period changes ("rgw
   realm reloader: Pausing frontends for realm update..."), which
   keeps happening shortly after the second zone joins the zonegroup,
   exactly when the test starts writing. While paused, the readiness
   probe also times out, the endpoint is removed from the Service, and
   connections to the ClusterIP are refused.

2. The "kubectl wait --for=condition=available deployment/..."
   barrier added previously is a no-op for these deployments: with one
   replica and maxUnavailable=1, the availability threshold is zero
   ready pods, so the condition is always true.

Changes:

- Wait on RGW pod readiness instead of deployment availability.
- Add a "wait for multisite sync to be established" step that polls
  "radosgw-admin sync status" on both clusters until metadata and
  data sync report caught up, mirroring the checkpoints ceph's own
  multisite QA performs before asserting replication.
- Probe both RGW endpoints over HTTP until several consecutive
  requests succeed before writing, to ride out realm-reload pauses.
- Replace the fixed 3-attempt s3cmd retries with time-budgeted
  retries.
- Replace the s3cmd read polling loop and its SIGUSR1 timer (which was
  never cancelled on success, silently shrinking the second
  direction's time budget) with "radosgw-admin bucket sync
  checkpoint", the marker-based barrier used by ceph QA, followed by
  a single get and diff.
- Dump multisite diagnostics (pod state, RGW logs, sync status,
  period) when the job fails.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit bf00821056)
2026-06-16 21:16:01 +00:00
Joshua Hoblitt 693cb5e02f ci: fix multus integration test setup flakes
Multus CI failures on master pushes from 2026-04-08 to 2026-06-10 were
dominated by a race in setup-multus.sh: 'kubectl wait' was invoked on a
pod label selector immediately after 'kubectl create' of a daemonset,
and it exits with "error: no matching resources found" when the
daemonset controller has not created any pods yet. This caused 9 of the
10 genuine multus flakes across the standalone multus workflow and the
canary multus-public-and-cluster job (the two share setup-multus.sh).

- setup-multus.sh: wait with 'kubectl rollout status' on the daemonsets
  instead of 'kubectl wait' on pod label selectors. The daemonset
  object exists as soon as 'kubectl create' returns, and rollout status
  correctly waits for all desired pods to be created and become ready.
  The old selector wait also silently under-waited: pods created after
  its initial LIST were never waited on at all. The stricter wait
  revealed that full multi-node convergence can exceed 2 minutes on
  busy runners, so the wait timeout is raised to 5 minutes (the waits
  return as soon as the rollouts are ready, so this costs nothing on
  healthy runs).

- Wait for the host-net-config daemonset rollout in both workflows
  before proceeding; it configures the host routing that the multus
  public network depends on and was previously not waited on at all.
  Pin its jonlabelle/network-tools image.

- test_multus_connections: retry the osd dump / fs dump network checks
  for up to 2 minutes. Daemons register their addresses in the mon maps
  asynchronously after the cluster reports ready; one canary failure
  (2026-04-29) ran the MDS check at fsmap epoch 1, before any MDS had
  registered.

- Dump cluster state (pods, daemonsets, events, multus logs) when the
  multus workflow job fails; the workflow previously had no failure
  diagnostics at all.

Also remove the unused NUMBER_OF_COMPUTE_NODES env var from the multus
workflow (kind-config.yaml creates 3 workers; nothing consumes it).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 4da654bae2)
2026-06-16 21:15:08 +00:00
Joshua Hoblitt 8839f0775d ci: reduce CephUpgradeSuite flakes
The CephUpgradeSuite workflow failed ~31% of PR runs vs the ~19%
broken-PR baseline of the other integration suites. Classifying the
failing step of every failed run from the last ~400 PR runs and the
logs of every failure on non-dependabot branches shows the excess
comes from a handful of too-tight waits, unretried network fetches,
and environment races rather than from the upgrade logic itself:

- The biggest class (21 of 44 genuine test-phase failure runs):
  "giving up waiting for deployment(s) with label
  app=rook-ceph-{rgw,osd},ceph-version!=..." during the
  Squid->Tentacle upgrade. The operator updates daemons sequentially
  (mons, mgr, osds with PG health gates between them, mds, rgw), so
  each later daemon's fixed 275s wait also absorbs the time spent on
  every daemon before it; rgw, last in the sequence, failed most
  often. The mon wait was already extended for slow image pulls in
  98bd03a42; extend the same retry count to all the daemon waits.

- ~7 runs: "snapshot controller is not ready" in the Helm upgrade
  path. WaitForSnapshotController(30) allows only 150s, and the logs
  show the deployment still converging (readyreplicas 1 < replicas 2)
  on the final poll. Raise to 90 retries.

- InstallOrUpgradeHelmRepoChart ran helm with no retry; an observed
  failure fetched the ceph-csi-drivers chart tarball from GitHub
  release assets and got a 504. Retry up to 5 times, as
  InstallLocalHelmChart already does.

- Raise the go test timeouts (2400s->3600s rook, 1800s->2700s helm).
  Failed runs ended in "panic: test timed out" during teardown, which
  aborts cleanup and log collection; the longer daemon waits above
  also need the headroom.

- The "setup cluster resources" composite action (shared by all
  suites) accounted for half of all failed jobs. The one steady class
  there (8 distinct runs across 7 different days): minikube exits with
  K8S_FAIL_CONNECT (code 40) when the requested kubernetes version is
  missing from its bundled version list, because it then validates the
  version with an anonymous GitHub API request (GITHUB_TOKEN is not
  honored on that code path), and anonymous requests from shared
  runner IPs are regularly rate-limited. minikube 1.38.x predates
  v1.35.5, so only the v1.35.5 jobs hit this class. Pass --force to
  minikube start to skip that check: the kubernetes versions used in
  CI are pinned constants already validated by the PRs that bump
  them, and an invalid version would still fail fast at the kubeadm
  download. Also seen twice: dpkg failing on a corrupt cri-dockerd .deb
  because curl ran without --fail and saved an HTTP error page as the
  package; add --fail and retries.

- On runners without the /mnt resource disk, the fallback OSD disk is
  an iSCSI (LIO) device and use_local_disk_for_integration_test
  returned early on those runners, skipping the udev nowatch
  workaround for the device re-probe storms of rook issue 8975. A burn-in
  failure on this PR captured the consequence with full kernel
  forensics: ~100 udev change events on the OSD disk, and ceph-volume
  activate wedged in uninterruptible sleep on the block device lock
  (blkdev_llseek -> rwsem_down_write_slowpath) for 18+ minutes during
  the ceph version upgrade while the cluster's only OSD stayed down.
  Install the nowatch rule before the early return so it applies to
  every runner type, and before the disk is first written rather than
  after.

- One burn-in round failed before the upgrade even began: the
  pre-upgrade PVC create on the Helm path expired WaitUntilPVCIsBound
  (RetryLoop, 275s) while the CSI provisioner pods were still
  starting. Set RETRY_MAX=110 for this workflow to double the
  framework's base wait budget, instead of extending individual waits
  one flake at a time.

- minikube also exits with GUEST_START (code 80) when its internal 6
  minute node-ready wait expires on slow runners (5 runs in the
  dataset, two more observed while burning in this PR, one of them on
  another suite). Pass --wait-timeout=15m to minikube start.

Not addressed (small or episodic classes): OSDs never coming up on
initial deploy (3 runs, possibly the same udev/iSCSI wedge), the
filesystem not becoming active (2 runs), and several day-clustered
minikube incidents (exit codes 65/67/90).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit cff8b7f311)
2026-06-16 21:14:15 +00:00
Joshua Hoblitt 0a48779416 ci: fix toolbox exec race in validate_cluster.sh
validate_cluster.sh built its ceph exec command around a toolbox pod
name captured once at script start, without waiting for the toolbox to
be ready. When the toolbox container was still being created, or the
pod had been replaced, every check failed with 'unable to upgrade
connection: container not found' for the entire wait window and the
mon quorum check timed out without ever observing the cluster. This
intermittently failed the 'wait for ceph cluster N to be ready' steps
of canary jobs (observed on master pushes of multi-cluster-mirroring
and the canary job between 2026-03-10 and 2026-04-24, always with the
container-not-found signature filling the whole window).

Wait for the toolbox deployment rollout up front, and exec through
deploy/rook-ceph-tools so each call resolves a currently-ready pod,
matching how the other CI scripts invoke the toolbox.

Also call wait_for_daemon directly instead of 'return $(...)'. The
command substitution ran wait_for_daemon in a subshell and captured
its output, so the 'current status' diagnostics printed on timeout
were never displayed; worse, the captured text became the argument of
'return', which fails with 'numeric argument required' and aborts the
script with a misleading exit code 2. The osd variant's captured
'Return value' debug echo had the same problem and is removed.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 98f088b54f)
2026-06-16 21:13:28 +00:00
Joshua Hoblitt 5449820ec8 test: run object suite store with a single rgw instance
rgw quota checks run against per-instance cached stats kept current by
local per-op deltas; the durable user stats object only catches up on
rgw_user_quota_bucket_sync_interval (180s), and a peer instance only
reloads it on the rgw_bucket_quota_ttl refresh cycle. With 3 gateways
behind the service, an S3 reconnect mid-test can land on an instance
that is blind to the objects already written, letting over-quota writes
pass until those clocks line up. A single gateway serves all writes
from one accurate cache, so enforcement is immediate and deterministic.

Multi-instance rgw deployment remains covered by the keystone suite,
and this matches the notification, COSI, and sharedstore fixtures that
already run one instance.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 8cbec942f4)
2026-06-12 19:06:04 +00:00
Joshua Hoblitt 3e1ab85028 tests: remove unused k8s helper functions
The package-level VersionAtLeast function had no callers anywhere in the
repo (the K8sHelper.VersionAtLeast method remains in use), and
IsKubectlErrorNotFound's only caller was provisioners.go, which is
deleted in this PR. Verified with deadcode and repo-wide grep.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit c4f8831a4d)
2026-06-12 16:11:27 +00:00
Joshua Hoblitt 7087b52557 tests: remove unused test framework helpers
Delete three files from tests/framework that are entirely dead code; no
symbol in any of them is referenced anywhere in the repo, including the
build-tagged integration suites (verified with deadcode and repo-wide
grep):

- clients/read_write.go: abandoned NFS test client (ReadWriteOperation
  and its methods)
- installer/provisioners.go: hostpath PV helpers orphaned when the
  cassandra and nfs installers were removed
- installer/device.go: IsAdditionalDeviceAvailableOnCluster, unused
  since the upgrade test rework

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit dbfdd818db)
2026-06-12 16:11:26 +00:00
subhamkrai 426225a60a csi: csi-addons should be disabled by default
having csi-addons enabled by default is causing random
pod restart on non-openshift cluster. Let's disable
it by default.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 34b0a87c9e)
2026-06-05 20:54:38 +00:00
Travis Nielsen 330e17bb13 ci: canary tests only start one csi controller
Two csi controllers cannot start on minikube, so the CI
was failing in the canary and nvmeof tests when they validated
that the controllers were running. For the tests that validate
the csi controllers, ensure only a single controller is configured.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 1a37f6088c)
2026-06-04 17:39:11 +00:00
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 1ad231b355 build: update csi-operator to v1.0.1
Updating csi-operator to latest v1.0.1 and
updating the required doc changes as well.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 34c5ad7049)
2026-05-27 13:50:27 +00:00
Santosh 12b8571f0a ci: retry s3cmd bucket creation in rgw-mutisite test
The rgw-multisite job is failing frequently. Observed
"connectionRefusedERror: connection Refused" on the s3cmd mb call. It
might be happening because CephObjectSTore CR is ready but RGW gateway
is not fully accepting TCP connections.

This PR  wraps s3cmd mb and s3cmd put calls in a retry loop that
will attempt each command up to 3 times with a 5 second sleep between
attemps. This might help fix the flaky CI test.

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit 2cc51e8eb0)
2026-05-26 17:45:36 +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
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 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
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
subhamkrai 9f978ec685 ci: fix some minor canary test issues
The canary test was waiting for replicapool
instead of replicapool2, and a more reliable
wait for the toolbox pod start is added.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit b50f1a3d60)
2026-05-12 12:49:21 -10:00
Travis Nielsen aff4a6b9f8 ci: upgrade tests from v1.19 to master
The upgrade integration tests for the v1.20 release need to
validate the upgrade starting from v1.19 to the latest.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 1f205c4be4)
2026-05-11 13:02:16 -10:00
Madhu Rajanna eb38b091ed csi: wait for the PV deletion
Wait for the PV deletion before deleting
the ceph resources like pools.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 799bd66243)
2026-05-06 08:21:10 +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
Travis Nielsen 82e9c4de51 core: update all docs and examples to v20.2.1
With the default version now being v20.2.1, also update
all of the examples, documentation, and default CI to run
with that version

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 62a9debceb)
2026-04-28 22:24:53 +00: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