Repository navigation
bootc: install with composefs for containers built for it - #4
cgwalters-bot wants to merge 5 commits into
Conversation
bootc-image-builder prints manifest warnings instead of failing, but
they were written without a prefix or trailing newline, so the next
progress message ran into the warning text ("...not supported: fooDone
generating manifest") and it was easy to miss. Print each warning as a
"WARNING:" line like the other warnings of the CLI. This also changes
the output of "image-builder manifest/build --ignore-warnings", which
uses the same code.
Generated-by: AI
For a bootc image with a unified kernel, the raw_bootc pipeline skips every customization stage after "bootc install" and drops the kernel arguments, since the command line is baked into the UKI. Users, files, kargs and extra mountpoints given in the blueprint were therefore silently ignored, and the build succeeded with an image that lacks them (e.g. no login user). Report them the same way as other unsupported blueprint options: as a manifest warning, which the image-builder CLI turns into an error unless --ignore-warnings is given and bootc-image-builder prints. The container's own partition table and the default kargs from our image definitions are not user input and are not reported. Supporting the /etc and /var customizations is tracked in osbuild#2560. Generated-by: AI
478e503 to
0660d34
Compare
Per AGENTS.md, for the human author to remove once reviewed. Generated-by: AI
bootc installs a container with the composefs backend, even without a UKI, when it ships /usr/lib/composefs/setup-root-conf.toml and has no ostree prepare-root.conf (see "The storage backend" in bootc-installation(7)). Record that so the disk image code can take it into account. Generated-by: AI
osbuild's bootc install-to-filesystem stage runs bootc from the
container, which installs a container that ships setup-root-conf.toml
and no ostree prepare-root.conf with composefs even though it has no
UKI. The customization stages after it then fail to mount the ostree
deployment ("Could not find deployment").
Treat such containers like UKI images: pass the composefs option, skip
the stages that work on the ostree deployment and report the
customizations that are dropped. Kernel arguments are still passed to
bootc install, which puts them in the BLS entries. The PXE tar image
type builds its live root from the ostree deployment, so it is refused
for these containers.
Generated-by: AI
0660d34 to
97fe5d1
Compare
|
Reworked for bootc-dev/bootc#2500, which dropped the Generated-by: https://github.com/cgwalters/#llms |
|
Are you sure we need this with the latest bootc shouldn't image builder just call Or is this a |
|
You are right about bootc. On main it picks composefs by itself, so the How
A cleaner fix that doesn't duplicate bootc's detection: Proposal: close #4, and rework #6 into that single PR. It would check the bootc capability instead of the backend, pass Generated-by: https://github.com/cgwalters/#llms |
Yes make a new draft for that |
Detect bootc containers built for the composefs backend the way
bootc installdoes since bootc-dev/bootc#2500: the container ships/usr/lib/composefs/setup-root-conf.tomland has no ostreeprepare-root.confin/usr/lib/ostreeor/etc/ostree(bootc-installation(7), "The storage backend"). For those, install with composefs like for UKI images: pass the composefs option tobootc install, skip the post-install stages that mount the ostree deployment (they fail with "Could not find deployment"), and report the dropped customizations as a manifest warning, as for UKI images. Kernel arguments are still passed tobootc install. Thepxe-tar-xzimage type, whose live root comes from the ostree deployment, is refused for these images.Stacked on #2; the last three commits are new. The first of them adds the review marker that the repository's AGENTS.md requires at the top of README.md; only the human author removes it.
Testing, on a 16-core RHEL 10 devspace (cgwalters-devspace-37017367119; logs):
go test -count=1 -race ./...in a privileged Fedora 43 container (as the unit test CI job): the same 16cmd/image-buildertests fail as on the base commit; everything else passes, includingTestComposefsBackend,TestManifestComposefsCustomizationsWarn,TestManifestPXEComposefsUnsupportedandTestRawBootcImageSerializeComposefs.go vetandgofmtclean.tools/gen-manifest-checksums.shon each commit: no checksum changes.BOOTC_variant=composefson fedora-bootc:44, which has the marker, noprepare-root.confand no composefs setting in its install configuration, made into a qcow2 by this branch's image-builder container with akernel.appendblueprint. It boots (UEFI, qemu-kvm) to a composefs (BLS, grub) deployment with averity=requirecomposefs root and the karg on the command line. Acustomizations.userblueprint fails withthe bootc container is built for the composefs backend, which does not support: customizations.user. With the previous head of this PR, which read thecomposefs-backendinstall config key, the same image fails inorg.osbuild.ostree.deploymentwith "Could not find deployment".quay.io/fedora/fedora-bootc:44(ostree), with kargs, a user, a group and files: builds and boots an ostree deployment with all of them.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.
osbuild/image-builder, basemainPVTI_lADOE9oHIs4BlJLczg9kEmITo 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).