workdir only used for root mount not recursed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-initramfs-tools (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Scott Moser |
Bug Description
=== Begin SRU Template ===
[Impact]
The impact on xenial would only be seen if there were multiple filesystems
mounted. In the 16.04 cloud image that is used on openstack or many other
clouds, there is only one partition. But in the 16.10 image there is
a separate uefi partition that caused havoc to overlayroot as the 'workdir'
option was not correctly supported.
[Test Case]
The following should work, but currently does not.
Note, to test the fix, between step 1 and 2, you'll need to enable
proposed and install overlayroot.
1. Start an instance of a cloud image with 2 disks.
On openstack by default you get 2 disks (an ephemeral and a root).
Cloud-init will configure the ephemeral to be a /mnt.
2. remove cloud-init's configuration of /etc/fstab options
These can cause issue with the way overlayroot does its mounts.
So just remove the special options that cloud-init writes.
$ sed -i.dist s/,x-systemd.
if you do not do that, then /mnt will not get mounted, and journalctl
will show a ordering cycle on the mount. The following will show failed.
systemctl status 'media-
Note, this is a separate bug, mentioned here only for completeness.
3. Enable proposed and install overlayroot to show fix.
$ rel=$(lsb_release -sc)
$ echo "deb http://
$ sudo tee /etc/apt/
$ sudo apt update -qy && sudo apt install -qy overlayroot </dev/null
$ dpkg-query --show overlayroot
overlayroot 0.27ubuntu1.3
4. configure overlayroot to use tmpfs with recurse=1 and reboot.
$ echo "overlayroot=
$ sudo reboot
4. log back in and look around
a.) check that 'overlay' is in /proc/mounts for / and /mnt
$ awk '$3 ~ /overlay/ { print $0 }' /proc/mounts
overlayroot / overlay rw,relatime,
b.) check that /mnt is set as overlay
$ df -h /mnt
Filesystem Size Used Avail Use% Mounted on
c.) check /run/initramfs/
$ grep success /run/initramfs/
[success]: configured root with 'tmpfs:recurse=1' using overlay per /dev/vda1/
[Regression Potential]
Previously almost any scenario with multiple mount points would cause
failure to boot. This change does improve the situation, and is not likely
to regress it.
[Other Info]
=== End SRU Template ===
to reproduce, boot a yakkety disk1.img. this is a uefi image, so it has multiple partitions.
sudo sh -c 'echo overlayroot=tmpfs > /etc/overlayroo
you'll see it hang. the reason i believe is the info written to /etc/fstab for the non-root mounts does not include workdir information.
Changed in cloud-initramfs-tools (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-initramfs-tools (Ubuntu Xenial): | |
status: | New → Fix Committed |
importance: | Undecided → Medium |
assignee: | nobody → Scott Moser (smoser) |
status: | Fix Committed → In Progress |
description: | updated |
description: | updated |
This bug was fixed in the package cloud-initramfs -tools - 0.28ubuntu1
--------------- -tools (0.28ubuntu1) yakkety; urgency=medium
cloud-initramfs
* overlayroot: write debug to /run/initramfs not /dev/.initramfs but
support writing to /dev/.initramfs if that is all there is. (LP: #1485752)
* overlayroot: fix overlayroot if recurse=0 was not provided.
This fuctionality was lost since workdir support was added. (LP: #1619459)
-- Scott Moser <email address hidden> Fri, 02 Sep 2016 11:20:53 -0400