Skip to content

fix(e2e): check /efi on the lifecycle candidate, not the baseline - #1346

Merged
hanthor merged 1 commit into
mainfrom
fix/lifecycle-baseline-efi
Nov 19, 2026
Merged

hanthor merged 1 commit into
mainfrom
fix/lifecycle-baseline-efi

Conversation

@hanthor

@hanthor hanthor commented Nov 19, 2026

Copy link
Copy Markdown
Member

Closes #1343.

Cause. Every Post-Testing E2E run since #1330 fails lifecycle (utah, ostree) at "EFI mountpoint is missing or an EFI mount unit failed" (runs 44393481076, 44407846577, 44420389987, 44436156773, 44448139466). The lifecycle installs its baseline, :testing before the run, from an ISO via luks-e2e.sh, and #1330 added an /efi gate to that script. :testing is still sha256:c686aac8…, built 2026-11-18 18:50 from 4cf5d0c3, nine minutes before #1330 (6fadb513) merged, so it has no /efi. Promotion needs the lifecycle (#1327, #1338), so :testing can never move past that image: a deadlock, not a flake.

Fix.

  • luks-e2e.sh: the EFI gate gets the same escape hatch as UTAH_E2E_PAYLOAD_CHECK/UTAH_E2E_FLATPAKS: UTAH_E2E_EFI_CHECK="" skips it. Standalone and candidate LUKS runs still check.
  • lifecycle-e2e.sh: the baseline install sets UTAH_E2E_EFI_CHECK="", and a new verify_efi_mount upgraded checks /efi, efi.automount and efi.mount on the booted candidate right after verify_boot_files upgraded, saving evidence/efi-upgraded.txt. The gate isn't weakened; it moves to the image it is meant to judge.
  • lifecycle-e2e.md records the rule: image-content gates belong to the candidate, never the baseline.

Tests (tests/test_lifecycle_efi.py): an image without /efi fails the gate by default and passes with UTAH_E2E_EFI_CHECK=""; verify_efi_mount upgraded runs right after the upgraded boot-file check and fails on a missing /efi.

Verified: umask 022; just check passes (1356 tests). Not run in a VM: the next Post-Testing E2E run after merge is the proof.

The lifecycle installs the previous :testing as its baseline, which predates
/efi (#1330). luks-e2e.sh's new EFI gate failed every Post-Testing E2E run
on that baseline, and because promotion needs the lifecycle, :testing could
never advance past it (#1343). The baseline install now skips that gate
(UTAH_E2E_EFI_CHECK=""), and the lifecycle checks /efi, efi.automount and
efi.mount on the booted candidate after the upgrade instead.

Assisted-by: Claude Opus via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hanthor
hanthor enabled auto-merge November 19, 2026 06:02
@mergeraptor
mergeraptor Bot requested review from bketelsen and castrojo November 19, 2026 06:02
@mergeraptor mergeraptor Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 19, 2026
@mergeraptor

mergeraptor Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hanthor

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@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 19, 2026

@hivecommons-hive hivecommons-hive Bot 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.

Summary: This change unblocks the automated upgrade test, which has failed on every run since a new boot-partition check was added. The check was being applied to the older starting system, which was built before the rule existed; it now runs on the new system after the upgrade instead. The fix looks correct and keeps the check in force. Two small follow-ups are suggested below; neither blocks merging.


Reviewed head 760e49c8. The fix matches #1343. The gate is skipped only for the lifecycle's baseline install (iso/scripts/lifecycle-e2e.sh:530). Standalone and candidate LUKS runs still check by default: ${UTAH_E2E_EFI_CHECK-x} is non-empty when the variable is unset (iso/scripts/luks-e2e.sh:970). The new check runs after the Phase 3 reboot into the candidate (lifecycle-e2e.sh:702). The new tests cover the default, the skip and the candidate check. I could not verify the change in a VM; as the PR body says, the next Post-Testing E2E run is the proof.

docs-currency (low, advisory)
docs/skills/local-testing.md:313-316 lists the escape hatches in luks-e2e.sh (UTAH_E2E_FLATPAKS, UTAH_E2E_PAYLOAD_CHECK), but not the new UTAH_E2E_EFI_CHECK. This PR documents the new switch only in lifecycle-e2e.md. Someone running just luks-test by hand will not find it. Suggested edit to local-testing.md:

-expected Flatpak set directly (empty skips the check), and
-`UTAH_E2E_PAYLOAD_CHECK=""` skips the booted-image assertion. The booted-image
+expected Flatpak set directly (empty skips the check),
+`UTAH_E2E_PAYLOAD_CHECK=""` skips the booted-image assertion, and
+`UTAH_E2E_EFI_CHECK=""` skips the `/efi` mountpoint check (the lifecycle sets
+it for its baseline install and checks the upgraded candidate instead). The booted-image

No findings from: correctness, security, intent-alignment.

Confidence: 5/5 (safe)

-- hive: agent=reviewer backend=claude model=claude-opus-5-5 effort=medium claude=2.1.327

# judges an old image by a newer rule and stalls promotion (#1343).
verify_efi_mount() {
local phase="$1"
ssh_target 'test -d /efi && for unit in efi.automount efi.mount; do load=$(systemctl show "$unit" -p LoadState --value) && state=$(systemctl show "$unit" -p ActiveState --value) && echo " $unit: load=$load active=$state" && test "$state" != failed || exit 1; done' \

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.

style (low, advisory): this guest command is now a verbatim copy of iso/scripts/luks-e2e.sh:972. The comment at line 158 says luks-e2e.sh "runs this", but the two are separate copies. A future fix to one (for example, reporting /efi existence separately from unit state, as #1343 suggested) can miss the other. Suggest pointing each copy at the other so they stay in sync. A shared helper would also work, but it is more than this fix needs:

Suggested change
ssh_target 'test -d /efi && for unit in efi.automount efi.mount; do load=$(systemctl show "$unit" -p LoadState --value) && state=$(systemctl show "$unit" -p ActiveState --value) && echo " $unit: load=$load active=$state" && test "$state" != failed || exit 1; done' \
# Keep in sync with the same check in luks-e2e.sh ("Verifying the installed EFI mountpoint").
ssh_target 'test -d /efi && for unit in efi.automount efi.mount; do load=$(systemctl show "$unit" -p LoadState --value) && state=$(systemctl show "$unit" -p ActiveState --value) && echo " $unit: load=$load active=$state" && test "$state" != failed || exit 1; done' \

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 19, 2026
@hanthor
hanthor added this pull request to the merge queue Nov 19, 2026
@hivecommons-hive hivecommons-hive Bot added stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted and removed stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Nov 19, 2026
Merged via the queue into main with commit 58cc564 Nov 19, 2026
52 checks passed
@hanthor
hanthor deleted the fix/lifecycle-baseline-efi branch November 19, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci-maintainer] Upgrade checks stop before testing upgrade or rollback

1 participant