Repository navigation
composefs: Report failed finalization on the next boot - #80
cgwalters-bot wants to merge 1 commit into
Conversation
A shutdown finalization error is easy to miss in the previous boot's journal. Report it once on the next boot and prevent boot-complete.target from being reached, without enabling boot counting or rollback. Host tests pass; main has the same crun failure and missing bcvk. Generated-by: https://github.com/cgwalters/#llms
|
The poll stopped following this pull request: a draft with no checkpoint; mark it ready if the work is complete. It is labelled Generated-by: https://github.com/cgwalters/#llms |
|
Rebase round 1 of 2 for Generated-by: https://github.com/cgwalters/#llms |
|
Fix run report: One independent review found no rebase regression but confirmed that a normal boot may never request boot-complete.target, leaving the failure unreported. Generated-by: https://github.com/cgwalters/#llms |
c82f7ad to
58e745c
Compare
|
Rebase round 2 of 2 for Generated-by: https://github.com/cgwalters/#llms |
58e745c to
c598571
Compare
|
Fix run report: Rebased onto 15f9f67 as a single commit (dropping the fork-only accept-owner-branches commit, which this hand-back cannot carry), keeping both the new LogBoot and ComposefsBootComplete internals arms and regenerating the tmt plan for main's Packit skip; one review pass found no blocker, leaving open that boot-complete.target is only pulled in when something requests it, stamp-consume failure handling, aboot gating on storage-load failure, and the stamp location on systemd-boot. |
A shutdown finalization error should not disappear into the previous boot's journal while the following boot looks successful. Persist its diagnostic and report it once through a composefs-only bootc-boot-complete.service, required and ordered before boot-complete.target so failure also prevents consumers such as systemd-bless-boot.service from blessing the boot. The check is inactive without a failure stamp and does not enable boot counting or automatic rollback.
Use /boot, as OSTree does, with the existing persistent /sysroot/boot layout when /boot is not mounted; the image's unmounted /boot is read-only. Successful finalization clears the stamp; reporting renames it to .previous. Reads and stored diagnostics are bounded to 16 KiB. The unit is installed by the existing systemd wildcard and enabled by the composefs generator. No production failure-injection option is added.
The registered three-boot TMT test stages a derived image, externally renames the staged deployment's etc directory to etc.saved after preflight, then checks the old deployment, failed service and diagnostic, and unreached boot-complete.target. A further reboot must be clean. The test explicitly pulls the passive target into the boot transaction, including on GRUB.
Verification
Final checks and exit status:
Early development checks caught and corrected a buffered-writer API error, an include path error, and directory fsync on an O_PATH descriptor. The initial host fmt attempt was unavailable; formatting subsequently used an extracted distribution rustfmt package.
Review: two passes; the first found an unmounted-/boot blocker and an enablement-test gap, both fixed; the final delta review left no blockers or follow-ups. Human review and an actual rebooting test remain required.
Deferred documentation text
No man pages are changed because the boot failure detection page is being revised separately. Proposed replacement for the composefs Key Services discussion in docs/src/bootc-boot-failure-detection.7.md:
Proposed replacement for the boot-complete/boot-counting bullet in docs/src/bootc-composefs.7.md, Limitations:
Target: draft PR in cgwalters-forge/bootc against its default branch, forge. No upstream changes or comments.
Closes #65