Skip to content

test(e2e): run the RustFS object store under OpenShift's restricted SCC - #10949

Merged
armru merged 3 commits into
mainfrom
dev/rustfs-openshift-scc
Jun 19, 2026
Merged

armru merged 3 commits into
mainfrom
dev/rustfs-openshift-scc

Conversation

@mnencia

@mnencia mnencia commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

The RustFS test object store introduced in #10865 hardcoded a pod fsGroup of 10001. OpenShift's restricted SCC assigns the pod an arbitrary UID and rejects an out-of-range fsGroup, so no pod was ever admitted, the e2e SynchronizedBeforeSuite hung waiting for the object store to become ready, and every OpenShift job ran to the 180-minute timeout with no specs executed. This only surfaces under a restricted SCC, which the community kind-based CI does not exercise.

Drop the fixed fsGroup so the SCC can assign a compliant UID. On OpenShift the SCC then makes the volumes group-writable through the assigned fsGroup. On kind and the cloud providers, where the PVC is root-owned and no fsGroup is applied, an init container creates the working subdirectories and makes them writable, so the non-root RustFS user can use them whatever UID it runs as. The projected TLS certificate drops its explicit 0600 mode and uses the default 0644, so it stays readable when no fsGroup is present.

This is a test-harness change only; it does not touch the operator or any production manifest.

Validated on a live OpenShift 4.21 cluster (the pod is rejected before, runs 1/1 with TLS ready after), against a simulated cloud CSI volume (root:root 0755, where an fsGroup-only fix CrashLoops the server with a permission-denied on the data dir), and on a plain kind cluster.

@mnencia
mnencia requested a review from a team June 19, 2026 08:19
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. E2E tests E2E tests tickets for easy triage on release process labels Jun 19, 2026
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.28 labels Jun 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@mnencia
mnencia force-pushed the dev/rustfs-openshift-scc branch from 7a24ad3 to 03dd7fe Compare June 19, 2026 08:40
@mnencia
mnencia force-pushed the dev/rustfs-openshift-scc branch 4 times, most recently from dc6e205 to 628ff97 Compare June 19, 2026 09:03
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 19, 2026
@mnencia

mnencia commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

/test d=main l=kind ft=backup-restore

@github-actions

Copy link
Copy Markdown
Contributor

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Jun 19, 2026
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 19, 2026
mnencia and others added 3 commits June 19, 2026 11:56
The RustFS test object store hardcoded a pod fsGroup of 10001.
OpenShift's restricted SCC assigns the pod an arbitrary UID and rejects
an out-of-range fsGroup, so the deployment was never admitted and the
e2e BeforeSuite hung until the job timed out.

Drop the fixed fsGroup so the SCC can assign a compliant UID. On
OpenShift the SCC then makes the volumes group-writable through the
assigned fsGroup; on kind and the cloud providers, where the PVC is
owned by root and no fsGroup is applied, an init container creates the
working subdirectories and makes them writable so the non-root RustFS
user can use them. The projected TLS certificate now uses the default
mode so it can be read under any assigned UID.

Assisted-by: Claude
Signed-off-by: Marco Nenciarini <[email protected]>
The RustFS object store now uses a busybox init container to prepare its
data and log directories, but the image was absent from the helper image
catalog. Add it so it is pulled and loaded into the test cluster alongside
the other fixture images, rather than fetched from the registry when the
pod starts.

Signed-off-by: Armando Ruocco <[email protected]>
The projected TLS volume relies on Kubernetes' default 0644 file mode so
the non-root RustFS server can read the certificate and key under any UID,
which matters now that the pod no longer sets an fsGroup. Add a comment so
the mode is not later tightened to a value that would make the files
unreadable on clusters that do not assign an fsGroup.

Signed-off-by: Armando Ruocco <[email protected]>
@mnencia
mnencia force-pushed the dev/rustfs-openshift-scc branch from ef1f60a to 214da47 Compare June 19, 2026 09:56
@armru
armru merged commit 7c92694 into main Jun 19, 2026
38 checks passed
@armru
armru deleted the dev/rustfs-openshift-scc branch June 19, 2026 10:10
cnpg-bot pushed a commit that referenced this pull request Jun 19, 2026
…CC (#10949)

The RustFS test object store introduced in #10865 hardcoded a pod
`fsGroup` of 10001. OpenShift's restricted SCC assigns the pod an
arbitrary UID and rejects an out-of-range `fsGroup`, so no pod was ever
admitted, the e2e `SynchronizedBeforeSuite` hung waiting for the object
store to become ready, and every OpenShift job ran to the 180-minute
timeout with no specs executed. This only surfaces under a restricted
SCC, which the community kind-based CI does not exercise.

Drop the fixed `fsGroup` so the SCC can assign a compliant UID. On
OpenShift the SCC then makes the volumes group-writable through the
assigned `fsGroup`. On kind and the cloud providers, where the PVC is
root-owned and no `fsGroup` is applied, an init container creates the
working subdirectories and makes them writable, so the non-root RustFS
user can use them whatever UID it runs as. The projected TLS certificate
drops its explicit `0600` mode and uses the default `0644`, so it stays
readable when no `fsGroup` is present.

This is a test-harness change only; it does not touch the operator or
any production manifest.

Validated on a live OpenShift 4.21 cluster (the pod is rejected before,
runs 1/1 with TLS ready after), against a simulated cloud CSI volume
(`root:root 0755`, where an fsGroup-only fix CrashLoops the server with
a permission-denied on the data dir), and on a plain kind cluster.

Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
(cherry picked from commit 7c92694)
cnpg-bot pushed a commit that referenced this pull request Jun 19, 2026
…CC (#10949)

The RustFS test object store introduced in #10865 hardcoded a pod
`fsGroup` of 10001. OpenShift's restricted SCC assigns the pod an
arbitrary UID and rejects an out-of-range `fsGroup`, so no pod was ever
admitted, the e2e `SynchronizedBeforeSuite` hung waiting for the object
store to become ready, and every OpenShift job ran to the 180-minute
timeout with no specs executed. This only surfaces under a restricted
SCC, which the community kind-based CI does not exercise.

Drop the fixed `fsGroup` so the SCC can assign a compliant UID. On
OpenShift the SCC then makes the volumes group-writable through the
assigned `fsGroup`. On kind and the cloud providers, where the PVC is
root-owned and no `fsGroup` is applied, an init container creates the
working subdirectories and makes them writable, so the non-root RustFS
user can use them whatever UID it runs as. The projected TLS certificate
drops its explicit `0600` mode and uses the default `0644`, so it stays
readable when no `fsGroup` is present.

This is a test-harness change only; it does not touch the operator or
any production manifest.

Validated on a live OpenShift 4.21 cluster (the pod is rejected before,
runs 1/1 with TLS ready after), against a simulated cloud CSI volume
(`root:root 0755`, where an fsGroup-only fix CrashLoops the server with
a permission-denied on the data dir), and on a plain kind cluster.

Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
(cherry picked from commit 7c92694)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases E2E tests E2E tests tickets for easy triage on release process lgtm This PR has been approved by a maintainer no-issue ok to merge 👌 This PR can be merged release-1.28 size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants