Please ship empty /etc/fstab in LXD images

Bug #1877078 reported by Balint Reczey
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Unassigned
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Systemd boots degraded because of the invalid content of /etc/fstab:

$ lxc shell gg-test
root@gg-test:~# systemctl is-system-running
degraded
root@gg-test:~# systemctl list-units --failed
  UNIT LOAD ACTIVE SUB DESCRIPTION
● systemd-remount-fs.service loaded failed failed Remount Root and Kernel File Systems

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.

1 loaded units listed.
root@gg-test:~# cat /etc/fstab
LABEL=cloudimg-rootfs / ext4 defaults 0 0
root@gg-test:~# echo "" > /etc/fstab
root@gg-test:~# reboot

Session terminated, killing shell... ...killed.
rbalint@yogi:~$ lxc shell gg-test
root@gg-test:~# systemctl is-system-running
running
root@gg-test:~# systemctl list-units --failed
  UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.

Not shipping is also fixing the issue, but some programs (such as systemd autopkgtes) reads fstab and a missing fstab should be special-cased, thus that would cause more breakages.

Related branches

tags: added: id-596e17fac6e5ac8ded74a8ee
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.668

---------------
livecd-rootfs (2.668) groovy; urgency=medium

  [ Łukasz 'sil2100' Zemczak ]
  * Enable overrides of UC20 grade dangerous channels - as this is possible.
    (LP: #1879350)

  [ Patrick Wu ]
  * live-build/ubuntu/hooks/040-hyperv-desktop-images.binary: fix issues
    with Hyper-V xrdp support.

  [ Balint Reczey ]
  * Remove fstab from squashfs images (LP: #1877078)

 -- Dimitri John Ledkov <email address hidden> Tue, 23 Jun 2020 15:05:11 +0100

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Revision history for this message
Balint Reczey (rbalint) wrote :

This change got reverted in livecd-rootfs and now breaks systemd autopkgtest.

livecd-rootfs (2.683) groovy; urgency=medium

  * Revert the removal of fstab from squashfs images, which has had knock-on
    effects and breaks MAAS (ref bug #1890803)

 -- Steve Langasek <email address hidden> Wed, 12 Aug 2020 11:31:12 -0700

IMO LXD images should not contain invalid fstab and MAAS should be fixed.

Changed in livecd-rootfs (Ubuntu):
status: Fix Released → Triaged
tags: added: update-excuse
Changed in systemd (Ubuntu):
status: New → Triaged
Revision history for this message
Balint Reczey (rbalint) wrote :

@vorlon What is your plan regarding this fix? The revert may have helped MAAS, but broke all LXD instances. IMO if MAAS relied on having a broken fstab then MAAS should be fixed and not LXD images should be broken, so I'd prefer having this fix in again. Maybe with /etc/fstab as an empty file which is not particularly beautiful, but not invalid at least.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1877078] Re: Please ship empty /etc/fstab in LXD images

On Tue, Aug 25, 2020 at 02:20:50PM -0000, Balint Reczey wrote:
> @vorlon What is your plan regarding this fix? The revert may have helped
> MAAS, but broke all LXD instances. IMO if MAAS relied on having a broken
> fstab then MAAS should be fixed and not LXD images should be broken, so
> I'd prefer having this fix in again. Maybe with /etc/fstab as an empty
> file which is not particularly beautiful, but not invalid at least.

MAAS images were broken because cloud-init could not handle the new
behavior. This is not the MAAS team's responsibility to fix, the Server
Team has been working on it with Dimitri; and having our MAAS images broken
was an unacceptable regression that was blocking kernel testing.

See the other linked bug, LP: #1890803, for details. If the
cloud-initramfs-tools change has landed, then the livecd-rootfs revert can
be reverted again.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.686

---------------
livecd-rootfs (2.686) groovy; urgency=medium

  [ Dan Streetman ]
  * use python3-launchpadlib directly instead of python3-software-properties

  [ Steve Langasek ]
  * Restore the removal of fstab from squashfs images, now that cloud-init
    has been fixed (LP: #1877078; ref bug #1890803)

 -- Steve Langasek <email address hidden> Thu, 27 Aug 2020 08:53:31 -0700

Changed in livecd-rootfs (Ubuntu):
status: Triaged → Fix Released
Balint Reczey (rbalint)
Changed in systemd (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.