overlayroot prevents shutdown / reboot under nfsroot

Bug #1165886 reported by Michał Sawicz
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cloud-initramfs-tools (Ubuntu)
Expired
Wishlist
Unassigned

Bug Description

Hey, I'm using nfsroot and as long as I don't overlay it, it will shutdown / reboot just fine.

As soon as I put tmpfs as an overlay, the system will hang on shutdown / reboot.

I'd love to add more detail (like some debug log - but all logging seems to stop before the hang), please point me anywhere I could read about debugging shutdown issues.

Changed in cloud-initramfs-tools (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cloud-initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Sean Bright (sbright) wrote :

Same symptoms as Michal and same inability to capture logs. This is fairly critical for me, how can I help move this forward?

Revision history for this message
Sean Bright (sbright) wrote :

Just messing around trying to get this to work. if I remove the eth0 stanzas (auto eth0... iface eth0...) from /etc/network/interfaces, I am able to shutdown with nfsroot + overlayrootfs.

Revision history for this message
Sean Bright (sbright) wrote :

Turns out that the /etc/network/interfaces stuff I mentioned before was a red herring, here is the actual problem.

Without overlayroot the (nfs) root filesystem is mounted at /, and on reboot/shutdown /etc/init.d/umountnfs.sh will skip that mount point when unmounting the network file systems (because of lines 49 & 50 of /etc/init.d/umountnfs.sh).

With overlayroot enabled, the "root" filesystem is mounted at /, but the nfs mount that is "under" the overlay is mounted at /media/root-ro, which is NOT skipped during reboot/shutdown.

The fix I have in place is to change line 49 of /etc/init.d/umountnfs.sh from:

    /|/proc|/dev|/dev/pts|/dev/shm|/proc/*|/sys|/run|/run/*)

to:

    /|/proc|/dev|/dev/pts|/dev/shm|/proc/*|/sys|/run|/run/*|/media/root-ro)

And I am able to reboot/shutdown properly.

Revision history for this message
Sean Bright (sbright) wrote :

Also, anyone looking to debug shutdown issues should do three things:

Set up a serial console on the affected machine by adding (there is a lot of documentation out there on how to do this)

Add --verbose to the kernel parameters (the APPEND line if you are PXE booting)
Change.

Change VERBOSE to 'yes' in /lib/init/vars.sh

That is how I was able to work out what was going on.

Revision history for this message
Scott Moser (smoser) wrote :

Hi, Is this still relevant with 16.04 or 18.04 ?

Changed in cloud-initramfs-tools (Ubuntu):
importance: Medium → Wishlist
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cloud-initramfs-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in cloud-initramfs-tools (Ubuntu):
status: Incomplete → Expired
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.