Skip to content

fix(ci): run the CSI unit and integration suites on Ubuntu 26.04 runners - #932

Merged
noctarius merged 2 commits into
mainfrom
fix/ci-ubuntu-2604-runner
Nov 18, 2026
Merged

noctarius merged 2 commits into
mainfrom
fix/ci-ubuntu-2604-runner

Conversation

@noctarius

Copy link
Copy Markdown
Collaborator

ubuntu-latest switched to Ubuntu 26.04 between two runs on main: 7983a98 passed on 24.04 and 1c4fb97 failed on 26.04. "CSI: Tests" and the integration job now fail on every branch, including #931.

Causes and fixes

  • uutils coreutils. On 26.04, sleep is one of 116 hard links to a single multicall binary that picks its utility from its own name. nfsexport's tests copied sleep as rpc.idmapd and nfsdcld to fake a running daemon. The copy exits at once ("Security violation: Requested utility rpc does not match executable name"), so TestEnsure*SkipsStartingItWhenAlreadyRunning lost a race on every CI run. The fake is now a copy of the test binary, which sleeps when NFSEXPORT_FAKE_PROCESS is set.
  • sudo-rs. 26.04's sudo ignores -E and warns on stderr. The integration harness runs talosctl under sudo -E to keep HOME and KUBECONFIG. Without them, talosctl ran with root's HOME, and the warning ended up in the JSON from config info ("parse talos context: invalid character 's'"). Both variables are now passed through sudo env, in the harness and in the workflow's diagnostics and cleanup steps.

Verification

  • An ubuntu:26.04 container reproduces the uutils failure. The new TestAFakeProcessKeepsRunning is red before the fix and green after, and the nfsexport package passes three runs under -race -cover.
  • TestSudoPassesHomeAndKubeconfigByName was red before the fix and green after. It checks only the arguments; this PR's integration job is the live check.
  • Lint, the house-style gate, and codespell are clean.

🤖 Generated with Claude Code

ubuntu-latest moved to 26.04 between two runs on main (7983a98 passed,
1c4fb97 failed), which brings two changes the tests assumed away.

- coreutils comes from uutils, where sleep is a hard link to one
  multicall binary that picks the utility from its own name. The
  nfsexport tests copied sleep as rpc.idmapd and nfsdcld to fake a
  running daemon. The copy refused to run and exited, so the "already
  running" tests lost a race on every run. The fake is now a copy of the
  test binary, which sleeps when NFSEXPORT_FAKE_PROCESS is set.
- sudo is sudo-rs, which ignores -E and warns on stderr. The integration
  harness ran talosctl under sudo -E for HOME and KUBECONFIG. talosctl
  ran with root's HOME, and the warning landed in the JSON the harness
  parses, so no suite brought its cluster up. Both variables are now
  passed by name through env, in the harness and in the workflow's
  diagnostics and cleanup steps.

Verified on an ubuntu:26.04 container: TestAFakeProcessKeepsRunning is
red before and green after, and the nfsexport package passes three runs
under -race -cover. The sudo change is unit-tested on the arguments
only; the integration job on this PR is its live check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The harness invokes sudo env, which is not covered by the documented passwordless grants, so unattended execution fails even though the sudo -n talosctl version preflight passes.

1 open issue
What changed in this PR

This PR addresses Ubuntu 26.04 runner compatibility in the CSI unit tests and Talos integration harness, targeting failures caused by uutils and sudo-rs.

Changes:

  • Replace renamed sleep binaries with a test-binary daemon substitute and add a liveness regression test.
  • Pass HOME and KUBECONFIG explicitly through sudo in the integration harness, with argument coverage.
  • Update workflow diagnostics and cleanup to pass HOME explicitly.
File Description
test/​integration/​cluster/​talos.go Extract command construction and explicitly pass Talos environment variables.
test/​integration/​cluster/​talos_test.go Add regression coverage for sudo environment arguments.
csi-driver/​internal/​nfsexport/​nfsd_test.go Use the test binary as a fake daemon and verify it stays running.
.github/​workflows/​integration_test.yaml Replace sudo -E in diagnostics and cleanup.

Review effort: Balanced

Comment thread test/integration/cluster/talos.go Resolved
…rough env

Running talosctl through `sudo env` changed the command sudo authorizes
from talosctl to env, which the scoped SETENV grant in the integration
README does not cover. An unattended developer host would have been
prompted, while the GitHub runner's NOPASSWD: ALL hid it. The variables
are now sudo's own VAR=value arguments, which that grant covers.

Checked on ubuntu:26.04 with sudo-rs 0.2.13: VAR=value works under both
NOPASSWD: ALL and a scoped SETENV grant, and the scoped grant refuses
the env form. README and workflow steps updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noctarius
noctarius merged commit bda2665 into main Nov 18, 2026
20 checks passed
@noctarius
noctarius deleted the fix/ci-ubuntu-2604-runner branch November 18, 2026 18:46
boddumanohar added a commit that referenced this pull request Nov 21, 2026
Claude-Session: https://claude.ai/code/session_011oztNZUjNFk6NYW7UXA1A2

# Conflicts:
#	.dockerignore
#	operator/api/v1alpha2/zz_generated.deepcopy.go
#	operator/dist/install.yaml
#	operator/internal/upgrade/crds/manifests/storage.simplyblock.io_controlplanes.yaml
boddumanohar pushed a commit that referenced this pull request Nov 23, 2026
…ers (#932)

* fix(ci): run the CSI unit and integration suites on Ubuntu 26.04 runners

ubuntu-latest moved to 26.04 between two runs on main (7983a98 passed,
1c4fb97 failed), which brings two changes the tests assumed away.

- coreutils comes from uutils, where sleep is a hard link to one
  multicall binary that picks the utility from its own name. The
  nfsexport tests copied sleep as rpc.idmapd and nfsdcld to fake a
  running daemon. The copy refused to run and exited, so the "already
  running" tests lost a race on every run. The fake is now a copy of the
  test binary, which sleeps when NFSEXPORT_FAKE_PROCESS is set.
- sudo is sudo-rs, which ignores -E and warns on stderr. The integration
  harness ran talosctl under sudo -E for HOME and KUBECONFIG. talosctl
  ran with root's HOME, and the warning landed in the JSON the harness
  parses, so no suite brought its cluster up. Both variables are now
  passed by name through env, in the harness and in the workflow's
  diagnostics and cleanup steps.

Verified on an ubuntu:26.04 container: TestAFakeProcessKeepsRunning is
red before and green after, and the nfsexport package passes three runs
under -race -cover. The sudo change is unit-tested on the arguments
only; the integration job on this PR is its live check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ci): set talosctl's HOME and KUBECONFIG as sudo arguments, not through env

Running talosctl through `sudo env` changed the command sudo authorizes
from talosctl to env, which the scoped SETENV grant in the integration
README does not cover. An unattended developer host would have been
prompted, while the GitHub runner's NOPASSWD: ALL hid it. The variables
are now sudo's own VAR=value arguments, which that grant covers.

Checked on ubuntu:26.04 with sudo-rs 0.2.13: VAR=value works under both
NOPASSWD: ALL and a scoped SETENV grant, and the scoped grant refuses
the env form. README and workflow steps updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit bda2665)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants