fix: export OCI from redirected podman storage - #11
Conversation
When non-composefs installs redirect podman storage to the target-disk scratch (--root .../containers-root), the post-pull skopeo export still addressed the default containers-storage, where the image does not exist — skopeo copy failed with exit status 2. Qualify the source reference as containers-storage:[driver@root+runroot]ref so skopeo reads the store the image was actually pulled into. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
podman run defaulted to bridge networking, which requires netavark's nftables stack — absent in minimal environments like the wootc deployer initramfs, failing the install with 'netavark: nftables error' (exit 126). The install container needs no network: the image arrives via bind mount. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The unconditional redirect (built for live ISOs) forces the OCI-export path, which lands three copies of the image inside the target disk (containers-root + oci-cache + the ostree deployment) — overflowing fixed-size targets like wootc's root.disk with 'min-free-space-percent 3% would be exceeded'. When the host provides disk-backed /var/lib/containers (the wootc deployer binds an ext4 loop there), use the direct containers-storage bind path instead: one copy in storage, one in the deployment. Also teach filesystemType about ramfs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
48eb3b3 to
36aebf8
Compare
36aebf8 to
eeebbd6
Compare
hanthor
left a comment
There was a problem hiding this comment.
Thanks for the detailed writeup — the containers-storage:[driver@graphroot+runroot] qualification and the containersStorageSource helper are the right shape, and the new internal test covers it well.
Blocking issue: the unit-tests CI job fails on the changed package, and at least one failure is diff-caused rather than environmental:
--- FAIL: TestBootcInstall_NonComposefsContainerExportsOCI
bootc_test.go:582: SkopeoExportOCIFn was not called for non-composefs
container mode with SourceImgref set
This looks like a direct consequence of the new gate in bootc.go:
if !opts.ComposeFsBackend && defaultStorageSpaceConstrained() {Previously the non-composefs path always set nonComposefsRoot, so useOciLayout was true and the OCI export (SkopeoExportOCIFn) ran. Now the export only happens when the default store is RAM-backed. In the unit-test environment that predicate is false, so useOciLayout stays false and Skopeo is never invoked — which is exactly what the test now reports. Please either update TestBootcInstall_NonComposefsContainerExportsOCI to reflect the new space-constrained gating (and inject/stub defaultStorageSpaceConstrained), or reconcile the implementation with the expected behavior.
Secondary, please double-check:
TestSelectStorageDriver_NonComposefs(driver = "overlay", want vfs) — this one may be environmental (the CI runner's/tmpsupporting an overlay probe), but it's failing on this run, so worth confirming it's not a real behavior change.- Lint reports two items in the file you touched:
bootc.go:892((*os/exec.Cmd).Runerrcheck) andbootc.go:820(writeStorageConfWithTmpDirunused). The other nilerr/gofmt findings are inpost/andslurp/files this PR doesn't touch and look pre-existing/systemic. There's also a stray double blank line introduced around thestorageDriver = nonComposefsDriverblock.
Kanpur E2E as the integration signal is reasonable, but the unit suite needs to be green (or updated) before merge.
Cherry-picked from projectbluefin#11 onto our base: keeps an explicit graph root + run root for the redirected podman pull and OCI export, preserves the qualified containers-storage source for skopeo, and only redirects storage when the default store is RAM-backed. Fixes the 'skopeo copy: exit status 2' installer failure. Applied cleanly on top of the NBD partitioning fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolves an indentation-only conflict in bootc.go. The PR side differed from the merge base by a blank line alone, so dev's gofmt -s formatting wins with no semantic change to either side.
|
Merged current The conflict was formatting only. One hunk in Why this became urgent. #14 fixed That is the qualified On the two failing unit tests, so they are not misattributed to the merge: No behaviour from this PR was touched; only the conflicting whitespace hunk. |
|
Not merging this — it now has a real, visible regression, and I would rather surface it than paper over it. With That is a CI-to-CI comparison — Why it fails, and why it is a design question rather than a test bugThe test asserts that for non-composefs container mode with So one of two things is true, and only you can say which:
I have deliberately not picked. Editing your test to match your PR would make that call for you, and if (1) is the truth it would convert a caught regression into a silent one — in a code path where "the OCI export did not happen" is precisely the failure this PR exists to fix. Context that may help decideThe E2E matrix failure I mentioned above is still unfixed and still looks like this PR's territory: Note that the E2E environment is the qualified-store case, and the failing unit test is the disk-backed default store case. If the redirect is being skipped in the disk-backed case, that may be the same decision producing both symptoms — which would point at (1). The merge of |
Fixes the installer failure observed in wootc Phase 2: the image pull succeeds into redirected, disk-backed Podman storage, but OCI export must address that exact store.
containers-storage:[driver@graphroot+runroot]source when invoking SkopeoValidated by a focused installer regression test. The full installer suite is environment-blocked here because the SELinux preload test cannot map its shared object from the local noexec temporary filesystem; Kanpur E2E is the integration validation.