| Summary: | meta-virtualization : docker container bundling failure | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Martin Frétigné <martin.fretigne> |
| Component: | virtual machines | Assignee: | Bruce Ashfield <bruce.ashfield> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | bruce.ashfield, randy.macleod |
| Version: | 6.0 | ||
| Target Milestone: | 6.1 M3 | ||
| Hardware: | ARM | ||
| OS: | x86_64 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
I don't normally do meta-virt bugs here, but since this is now part of AB runs for reference containers, I'm definitely more willing.
Thanks for the report and the reproducer .. this bundling path is exercised
heavily and often here, so it's known-good in the configuration stack we run
it in. What you ran into is that docs/container-bundling.md doesn't spell out
the full DISTRO_FEATURES the vruntime side expects -- your build had a leaner
config than the doc's flow assumes, so a couple of things our stack provides
weren't present.
Concretely: our host configs pull in meta-virt-host.conf, which sets
virtualization and systemd in DISTRO_FEATURES, and those carry into the
vruntime multiconfig. That's what makes both of the spots you hit line up:
- with systemd set, docker-moby doesn't pull cgroup-lite (docker.inc only
needs it when systemd is absent), so the BBMASK never comes into play;
- with virtualization set, the container kernel fragment (container.scc ->
9p/squashfs/overlayfs) is applied, so the guest mounts rootfs.img.
Both of your changes are re-supplying what that stack normally provides, so
they're the right move for a leaner config.
Rather than just filling the doc gap, there are a couple of usability holes
here worth closing, so this works without the extra edits and fails clearly
when the config is incomplete. I've committed:
1. Stopped masking cgroup-lite. The vruntime rootfs is busybox-init (no
systemd), and docker legitimately wants cgroup-lite there, so a
no-systemd stack should resolve without anyone touching the mask.
2. Made the vruntime distro declare virtualization itself, so it carries
the container kernel feature on its own instead of relying on a
top-level append being in place. It's only the one feature and pulls no
extra userspace packages, so the rootfs doesn't grow.
3. Added a REQUIRED_DISTRO_FEATURES / features_check guard on the
vdkr/vpdmn rootfs images, so an incomplete config gives a clear
parse-time error instead of a silent runtime mount failure.
I'm testing these right now on master; I'll get them onto wrynose too since
that's what you're on. After that the bundling flow should work without
either of your local changes.
Ok, cool, thank you, I appreciate that. Reporter confirmed the wrynose branch works, including the fixes for this issue. Closing. |
Hello, using yocto wrynose, I want to bundle a docker image into a linux system image, as described in docs/container-bundling.md My system image inherits from container-cross-install.bbclass, which depends on the output of this command 'bitbake mc:vruntime-aarch64:vdkr-initramfs-create', but there are two problems. 1) vdkr-initramfs-create : The image depends on 'cgroup-lite' (dependencies chain : ['vdkr-initramfs-create', 'vdkr-rootfs-image', 'docker-moby', 'cgroup-lite']), which is masked in conf/distro/include/vruntime-bbmask.inc. I deleted the BBMASK/cgroup-lite line to fix that problem. 2) container-cross-install : vrunner launches qemu, which fails to mount the rootfs.img file, hence fails to bundle the docker image. This is because 'virtualization' is not added to distro_features, hence vcontainer.scc fragment is not used for the kernel build. I added DISTRO_FEATURES:append = "virtualization" to vruntime.conf to fix that problem With these two changes my docker image is bundled in my system image. Do these fixes seem correct to you ?