Repository navigation
composefs: bootc edit follow-ups: sealed UKI test, actionable same-digest error - #22
cgwalters-bot wants to merge 5 commits into
Conversation
Prep for implementing `bootc edit` on composefs, which needs the same staging logic with a target image that comes from an edited spec rather than from `SwitchOpts`. The journal record drops `bootc.from_downloaded`, which was always false there since that case returns earlier. Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
`bootc edit` bailed on the composefs backend, one of the gaps listed for stabilizing it. The ostree logic maps over directly: the only transitions `edit` supports are an image change or a boot order flip, and composefs already has both as `switch` and `rollback`. So parse and validate the edited spec in a helper shared by both backends, and dispatch to the composefs switch or rollback code. Like `bootc switch` on composefs, editing the image back to one that is already deployed (e.g. the booted image while another is staged) errors on the identical fs-verity digest, where ostree would stage it again. The new tmt test runs on both backends, since the ostree path had no integration coverage either. Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
Edits that change the image go through the composefs switch code, whose journal record said bootc.operation=switch, which is misleading when searching the journal for what the user actually ran. Let the caller name the operation. Generated-by: AI
Switching (or editing the image) to one whose fs-verity digest matches an existing deployment fails, and the error only named the slot, as a Debug-formatted Option. The most likely case is going back to the previous image, which is the rollback deployment: that is what `bootc rollback` (or `spec.bootOrder: rollback` in `bootc edit`) is for, so say so, unless a rollback is already queued, where running it again would undo that. For the booted deployment, explain that it is already running, and that any staged deployment remains queued. Generated-by: AI
On sealed UKI systems the firmware refuses the unsigned UKI of an image built inside the VM, so the test's reboot into the edited image timed out there. Like test-image-upgrade-reboot, use the signed upgrade image the host provides through bind storage, and build one in the VM only without it. On composefs, also check that editing the image back to the rollback deployment's points at `bootc rollback`. Generated-by: AI
0ccd0b6 to
bb86d3d
Compare
|
Per cgwalters' answer on tracker#238 (D2): the tmt test-number conflict will go away rather than be worked around by renumbering. The prep PR #41 drops test numbers (tests and plans are named by slug) and generates one tmt file per test and plan. Once it merges, this rebases onto it, dropping its Generated-by: https://github.com/cgwalters/#llms |
|
Fix round 1 of 2 for Generated-by: https://github.com/cgwalters/#llms |
bb86d3d to
777c9a3
Compare
|
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 |
|
Question for the operator (one line, from the Needs you sweep tracker#1266/bootc-dev#1267): Will you authorize upstream delivery of the edit follow-ups after their parent lands and the draft is rebased, the recommended stack order, preserving the already-selected slug-based tests? Answer here or in the review app; a plain yes takes the recommendation. Generated-by: https://github.com/cgwalters/#llms |
Follow-up to bootc-dev#2501, with fixes from its review on the forge. It is stacked on that PR, so until bootc-dev#2501 merges this also shows its two commits; only the last three are new. It'll be rebased onto main once bootc-dev#2501 merges.
test-edit.nunow edits into the signed upgrade image the host provides through bind storage (extra-try_bind_storage), liketest-image-upgrade-reboot, and builds one in the VM only when there isn't one. On sealed UKI, Secure Boot refuses the unsigned UKI of an image built in the VM....as the existing Some(Rollback) deployment.. For the rollback deployment it now suggestsbootc rollback(orspec.bootOrder: rollback), or says it is already queued when a rollback is queued. For the booted deployment it says the image is already running and that any staged deployment stays queued.test-editchecks the rollback case on composefs, andtest-switch-same-digestnow checks the booted case.bootc editon composefs is now logged withbootc.operation=edit, notswitch.Testing: everything ran on a 16-core RHEL 10 devspace. On cgwalters-devspace-36149048088,
plan-50-editpassed through all three boots on each of: composefs sealed UKI with systemd-boot (ext4, Secure Boot), composefs GRUB/BLS unsealed (ext4), and ostree. All three used the host upgrade image. It also passed on ostree with--skip-bind-storage=true, which exercises the in-VM build fallback, andcargo checkpassed on each intermediate commit. After the queued-rollback fix, on the final tree (cgwalters-devspace-36160141092):just unit-tests(includingtest_digest_collision_error),just validate, andplan-43-switch-same-digeston composefs GRUB/BLS unsealed passed.Generated-by: https://github.com/cgwalters/#llms
Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.
bootc-dev/bootc, basemainPVTI_lADOE9oHIs4BlJLczg9kEhATo review:
/promoteon a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.Signed-off-by: Colin Walters <walters@verbum.org>to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer./draftline (in the same comment or before) to open it upstream as a draft (/readyundoes that).