composefs: Implement bootc edit - #2501
cgwalters-bot wants to merge 2 commits into
Conversation
|
Rebased onto main; 2 commits, no content change. Generated-by: https://github.com/cgwalters/#llms |
1bd98d8 to
8cb79b6
Compare
|
@cgwalters Rebased onto main (now d06478e). Main took tmt test number 50 (plan-50-switch-zstd-chunked), which this PR also used, so
Tested on a 16-core devspace with Generated-by: https://github.com/cgwalters/#llms |
8cb79b6 to
d06478e
Compare
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
d06478e to
2b079cc
Compare
|
@cgwalters Rebased onto main (now 2b079cc); the only conflicts were in the generated tmt lists (
Tested on a 16-core devspace with Generated-by: https://github.com/cgwalters/#llms |
bootc editbailed on the composefs backend. It only supports two transitions, an image change and a boot order flip, and composefs already implements those asswitchandrollback. This change shares the edited-spec parsing and validation between the two backends and dispatches to those. The first commit is a prep commit that splits upswitch_composefs.On composefs, editing the image back to one that is already deployed fails on the identical fs-verity digest, just as
bootc switchdoes.Testing: a new tmt test,
plan-50-edit, covers a no-op edit, an image+rollback edit that must be rejected, an image change, and a boot order flip across reboots. It passed on composefs with GRUB and BLS (unsealed, ext4) and on ostree. Unit tests, including a new table-driventest_validate_edited_spec, andjust validatealso passed. Everything ran on a 16-core RHEL 10 devspace. Sealed UKI with systemd-boot is still unverified: there the guest times out on reboot, and the existingplan-36-rollbackfails the same way, so it looks like an environment problem. It still needs a run in upstream CI (the composefs sealed matrix leg).The
Signed-off-by: Colin Walters <walters@verbum.org>on these commits was added on cgwalters's approval of the review draft: cgwalters-forge#20 (review)Generated-by: https://github.com/cgwalters/#llms