Comment 42 for bug 1878225

Revision history for this message
John Chittum (jchittum) wrote :

if the core issue is falling to snap pre-seeding, then, yes, there is a reliance on matching kernel at build time of the squashfs and the build system.

this is because we build the images in a chroot, and have to mount in the apparmor features to the chroot. when launching a container with a "mismatched" kernel, with snapd running, it may not have the matching set of features. You can see this in the `apparmor-features` and `apparmor-parser-features` under the `preseed` and `seed-restart` keys.

unfortunately, this is a limitation in snap preseeding right now, where snapd has a hard requirement on knowing the kernel apparmor sets. here are some links:

1. the function that must be called during build the validate the seed

https://git.launchpad.net/livecd-rootfs/tree/live-build/functions?h=ubuntu/jammy#n759

2. the different kernel directories

https://git.launchpad.net/livecd-rootfs/tree/live-build/apparmor?h=ubuntu/jammy