Repository navigation
fix(e2e): check /efi on the lifecycle candidate, not the baseline - #1346
Conversation
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>
|
[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 |
There was a problem hiding this comment.
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-imageNo 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' \ |
There was a problem hiding this comment.
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:
| 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' \ |
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,:testingbefore the run, from an ISO vialuks-e2e.sh, and #1330 added an/efigate to that script.:testingis stillsha256:c686aac8…, built 2026-11-18 18:50 from4cf5d0c3, nine minutes before #1330 (6fadb513) merged, so it has no/efi. Promotion needs the lifecycle (#1327, #1338), so:testingcan never move past that image: a deadlock, not a flake.Fix.
luks-e2e.sh: the EFI gate gets the same escape hatch asUTAH_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 setsUTAH_E2E_EFI_CHECK="", and a newverify_efi_mount upgradedchecks/efi,efi.automountandefi.mounton the booted candidate right afterverify_boot_files upgraded, savingevidence/efi-upgraded.txt. The gate isn't weakened; it moves to the image it is meant to judge.lifecycle-e2e.mdrecords the rule: image-content gates belong to the candidate, never the baseline.Tests (
tests/test_lifecycle_efi.py): an image without/efifails the gate by default and passes withUTAH_E2E_EFI_CHECK="";verify_efi_mount upgradedruns right after the upgraded boot-file check and fails on a missing/efi.Verified:
umask 022; just checkpasses (1356 tests). Not run in a VM: the next Post-Testing E2E run after merge is the proof.