cloud images should have /lib/modules inside

Bug #1543204 reported by Scott Moser on 2016-02-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-images
High
Unassigned
livecd-rootfs (Ubuntu)
Undecided
Unassigned
Nominated for Trusty by Robert C Jennings

Bug Description

maas images for xenial recently removed the kernel being installed inside.
Now, usage of modules after the initramfs depends upon cloud-initramfs-copymods being able to copy (tmpfs bind mount) the /lib/modules/VERSION from the initramfs into the root.

cloud-initramfs-copymods does this by just bind-mounting a directory with VERSION over the top of lib/modules in the rootfs.
If that directory is not present, then it cannot perform that mount.

The fix then would be either:
a.) ensure that all ubuntu images have /lib/modules inside them
    Currently the lxd images do not have /lib/modules in them.
b.) cloud-initramfs-copymods learn how to address this issue.
    Its very non-trivial to do this, as cloud-initramfs-copymods executes when the target root is mounted read-only. In order to solve the problem then, the initramfs would have to put its copy somewhere else and rely on a process moving the mount after / is mounted rw. And then, there is a possibility that / is *never* mounted RW.
c.) fix maas images build process to insist that its output contains /lib/modules
    currently the build process uses the cloud-image and then removes a kernel (which probably gets /lib/modules removed). The end goal is to use lxd images directly (at very least from a filesystem-contents perspective) so we'd' like to have the fix in 'a'.

I'll fix 'c' which will unbreak us for now.
I'll ask cloud images team to ensure /lib/modules is present.

Related branches

Scott Moser (smoser) on 2016-02-08
Changed in maas-images:
status: New → Confirmed
importance: Undecided → Medium
importance: Medium → High
status: Confirmed → Fix Committed
Changed in maas-images:
status: Fix Committed → Fix Released
Scott Moser (smoser) wrote :

Just for later reference, similar bug 1792905.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers