lints: Don't require ostree bits on composefs-native images - #2500
cgwalters-bot wants to merge 2 commits into
Conversation
cgwalters
left a comment
There was a problem hiding this comment.
CI failure seems legit
Head branch was pushed to by a user without write access
|
The failure was a real bug, but in the tests rather than in this change: Fixed in a new commit on top, aec657d "tests-integration: Fix race between the install config tests", which merges the two into one test. Your lint commit is unchanged, but the new commit has no sign-off yet, so it needs your re-approval. Tested on a 16-core devspace: the same stress loop on the fixed image had 0 failures in 18000 runs; Generated-by: https://github.com/cgwalters/#llms |
The baseimage-root lint insists on an /ostree -> sysroot/ostree symlink, and baseimage-composefs warns unless ostree's prepare-root.conf enables composefs. Both are meaningless for images that are only ever deployed with the composefs backend, and just force them to carry ostree cruft. Use the presence of /usr/lib/composefs/setup-root-conf.toml (even if empty) as the signal that an image is composefs-native, mirroring how prepare-root.conf signals ostree. If /ostree is present anyway it is still validated, and /sysroot is still required since both backends mount the physical root there. Closes: bootc-dev#2256 Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
"printconfig --all" writes /run/bootc/install/10-test.toml and deletes it again, while "install config" runs `bootc install print-configuration` in parallel. When the drop-in vanishes between load_config()'s directory scan and its read, the latter fails with "Loading configuration: No such file or directory". This flakes the container integration tests on random PRs and variants. Merge the two into one test that checks both outputs with the drop-in in place. Generated-by: AI
|
Rebased onto main; 2 commits, no content change. Generated-by: https://github.com/cgwalters/#llms |
aec657d to
95920b0
Compare
bootc container lintrequires an/ostree -> sysroot/ostreesymlink (thefatal
baseimage-rootlint) and warns unless ostree'sprepare-root.confenables composefs (
baseimage-composefs). Both are meaningless for imagesthat are only ever deployed with the composefs backend, and force them to
carry ostree cruft. Of the options discussed in #2256, detecting
/usr/lib/composefs/setup-root-conf.toml(even if empty) is the one that isactionable now, and it mirrors how
prepare-root.confsignals ostree.So when that file exists, a missing
/ostreeis accepted and theprepare-root.confcheck is skipped. If/ostreeis present anyway it isstill validated, and
/sysrootis still required since both backends mountthe physical root there. The lint descriptions, bootc-images.md (which
called the
/ostreerequirement a bug) and bootc-setup-root-conf.toml(5)now describe the file as the composefs-native marker.
Testing: extended the
baseimage-rootunit test to cover a composefs-nativeimage without
/ostree, with a bogus/ostreedirectory, and without/sysroot, and thebaseimage-composefstest to cover a composefs-nativeimage whose
prepare-root.confdisables composefs. On a 16-core RHEL 10devspace, rebased on current main:
cargo test -p bootc-lib(271passed, the same count as main since existing tests were extended) and
just validatepassed.CI note (2026-09-24): the
test-integration (fedora-44, composefs, ext4, grub, bls, unsealed)failure is unrelated to this change: the container testinstall configfailed withLoading configuration: No such file or directory, a race with the concurrently runningprintconfig --alltest, which creates and deletes/run/bootc/install/10-test.tomlwhileprint-configurationscans that directory. The same leg passed on other PRs with the same base. Failed jobs will be rerun once the run completes.bootc requires DCO: the commits have no
Signed-off-by, so a maintainer must sign off before merging (e.g.git rebase --signoff <base>and force-push).Closes: #2256
The
Signed-off-by: Colin Walters <walters@verbum.org>on these commits was added on cgwalters's approval of the review draft: cgwalters-forge#4 (review)Generated-by: https://github.com/cgwalters/#llms