Skip to content

fix(e2e): preserve container storage on lifecycle reboots - #1205

Closed
castrojo wants to merge 1 commit into
mainfrom
fix/e2e-home-nonrecursive-tmpfiles
Closed

castrojo wants to merge 1 commit into
mainfrom
fix/e2e-home-nonrecursive-tmpfiles

Conversation

@castrojo

Copy link
Copy Markdown
Collaborator

What

Remove the redundant recursive Z tmpfiles rule injected by the VM harness. The existing d rules create, constrain and relabel only the test home and .ssh directories. No test files, fixtures, expected outputs, allowlists, policies, coverage thresholds or check conditions change.

Why

In lifecycle run 43526643244, every executable Utah lifecycle scenario passed (16 passed, 8 skipped), but the SELinux gate failed. The VM serial log shows systemd-tmpfiles walking Podman storage hardlinks beneath the test home on reboot; the recursive harness rule generated systemd_tmpfiles_t denials reading /proc/sys/fs/protected_hardlinks. The nonrecursive d primitive already performs the required directory setup. The matching harness skill records this ownership boundary.

This does not suppress or claim to fix Utah's independent chcon denials or bootupd's permissive-domain .bootc-aleph.json records. The full existing AVC gate and canary remain intact.

Verification

  • Full unchanged unit suite with the CI's Python 3.15 dependency set: 2875 passed, 3 failed. All three failures are ephemeral git fixture commits with message change, rejected by this workstation's global Conventional Commits hook. Neither hooks nor tests were changed or disabled. CI runs the complete suite.
  • Full lifecycle firmware module: 6 passed. Full isolated-session/canary wrapper modules on existing PR feat(gnome): run GNOME OS extension tests without admin rights or login keys #1198: 35 passed.
  • Ruff, docs validation and skill catalog checks passed; just list-stubs passed. This repository has no just check recipe or pre-commit configuration.
  • The three affected rendered lifecycle shell blocks pass bash -n; YAML parses. Raw actionlint with ShellCheck reports existing workflow warnings, retained in the report rather than suppressed.
  • Real systemd-tmpfiles --create applied twice to private home/.ssh directories with hardlinked container contents: home/.ssh remain 0700 and nested container file modes/ownership remain unchanged.
  • Hosted full lifecycle verification uses distinct immutable Utah base/target digests and keeps SELinux enforcing; its result will be attached once complete. No claim of hosted green while that run is pending.

Attribution is included in the commit trailers. No forced release, hold closure, self-approval or merge is requested.

Remove the redundant recursive tmpfiles home rule. Existing d entries create, label, and constrain the home directories without walking container storage on every boot. The full SELinux denial gate is unchanged.

Assisted-by: GPT-6.1 Sol via GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor
948274b

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @castrojo, head 948274b7bd76) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/e2e.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 14, 2026
@castrojo

Copy link
Copy Markdown
Collaborator Author

Verification: full CI unit suite 2880 passed, coverage 87%; all PR checks completed successfully (VM run). Full distinct-digest Utah lifecycle 43535082068 ran 16 passed / 8 skipped, with SELinux enforcing and its canary detected. The harness-induced systemd-tmpfiles AVC records went from 80 to 0. The run correctly remains red on 59 chcon mac_admin records from the image; the independent image-source repair is projectbluefin/utah#1203. Bootupd permissive-domain records remain warnings. No allowlist, policy, test, expected-output or check change was made. Native Dakota common evidence is only 1 passed / 117 skipped, and Firefox 0 passed / 1 skipped; those green checks do not prove comprehensive native coverage. Local full-suite fixture commits encounter the workstation Conventional Commits hook (3 failures); it was not disabled.

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 14, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@castrojo this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • test / GNOME — lifecycle

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@Danathar

Copy link
Copy Markdown
Contributor

Thanks, this was the right fix, and it showed that the systemd-tmpfiles denial was ours, not utah's (I've closed projectbluefin/utah#1210 with a correction). This commit has no Signed-off-by, so the hive can't merge it, and the agents are down on quota. I've redone the same change in #1207 with a sign-off and a regression test, crediting this PR and its run 43535082068. Closing in favour of #1207.

@Danathar Danathar closed this Nov 14, 2026
Danathar added a commit that referenced this pull request Nov 14, 2026
The harness's /etc/tmpfiles.d/ci-user.conf began with a recursive
`Z /var/home/bluefin-test` rule. Once the runner container is loaded, the
home holds Podman storage, and every later boot made systemd-tmpfiles walk
its hardlinks, producing systemd_tmpfiles_t -> proc_security_t denials on
/proc/sys/fs/protected_hardlinks on every boot after the first (44 in
lifecycle run 43510394355). The non-recursive `d` entries already create
the home and .ssh and set their mode, owner and label.

Found by castrojo in #1205 (whose utah lifecycle run 43535082068 has none
of these denials once the rule is gone); redone here with a sign-off and a
regression test, since #1205's commit has none.

Assisted-by: Claude Opus 5.5 via Claude Code

Claude-Session: https://claude.ai/code/session_01WcWm7qQa538Zjcuvv8jBtn

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Danathar <Danathar@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login no-dco A commit is missing Signed-off-by — run `git rebase --signoff` role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants