Skip to content

composefs: Hold /boot open while a deployment is staged - #2496

Merged
cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters-forge:bot/finalize-staged-hold
Sep 25, 2026
Merged

cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters-forge:bot/finalize-staged-hold

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Copy over the logic from ostreedev/ostree@f3db79e7 ("finalize-staged: Ensure /boot automount doesn't expire") to composefs as well: a new bootc-finalize-staged-hold.service, pulled in by bootc-finalize-staged.service, keeps a file descriptor open on /boot while a deployment is staged, so its automount can't expire and race with finalization at shutdown.

This fixes the plan-44 "guest reboot timeout" CI flake; see the CI analysis. It would also make RequiresMountsFor=/boot on the finalize unit (#2488) safe.

Testing: on CentOS Stream 10 composefs images, rebooting right inside the automount expire window hung and booted the old deployment 4/4 times on main, and 0/10 times with this change. plan-44-shadow-fixup passes, as do just validate and just unit-tests. test-44 now also checks that staging starts the hold unit.

bootc requires DCO: the commit has no Signed-off-by, so a maintainer must sign off before merging (e.g. git rebase --signoff <base> and force-push).

Generated-by: https://github.com/cgwalters/#llms

Comment thread systemd/bootc-finalize-staged-hold.service Outdated
Comment thread crates/lib/src/cli.rs Outdated
Comment thread crates/lib/src/cli.rs Outdated
@cgwalters-bot
cgwalters-bot force-pushed the bot/finalize-staged-hold branch from 31df035 to a6b6a5c Compare September 24, 2026 20:27
Copy over the logic from
ostreedev/ostree@f3db79e7
("finalize-staged: Ensure /boot automount doesn't expire") to composefs
as well. In order to properly handle shutdown we need to ensure we have
a file descriptor open on /boot, so that its automount can't expire.

This fixes the plan-44 "guest reboot timeout" CI flake, see
https://gist.github.com/cgwalters-bot/b51f1c81144092d70577ff9b80cda556

Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
cgwalters force-pushed the bot/finalize-staged-hold branch from a6b6a5c to c927d9c Compare September 24, 2026 21:52
@cgwalters
cgwalters enabled auto-merge (rebase) September 25, 2026 00:57
@cgwalters
cgwalters merged commit f62a0ed into bootc-dev:main Sep 25, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants