Running ifup@ for all interfaces breaks no-auto-down

Bug #1986536 reported by Gaelan Steele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
New
Undecided
Unassigned

Bug Description

We (mythic-beasts.com) run a "Raspberry Pi cloud", consisting of Raspberry Pis with no SD card and an NFS root file system. This requires special considerations for shutting down, as bringing down eth0 will break the file system and cause the shutdown process to hang forever.

ifupdown has a config option for exactly this situation: no-auto-down. We set this flag in /etc/network/interfaces.d/eth0.

However, this flag only prevents `ifdown -a` from bringing down the interface; `ifdown eth0` still does. Unfortunately, <email address hidden> does exactly this when bringing down the system.

This isn't an issue on Debian, because Debian only starts ifup@.service for services marked "allow-hotplug"; non-hotplug services are started and stopped by networking.service, which just uses `if{up,down} -a`. Ubuntu, on the other hand, brings up ifup@.service for all services marked auto. (This was an intentional change - see the Ubuntu ifupdown changelog.)

As such, unless I'm missing something, there's no way on Ubuntu to have an interface that's automatically brought up on boot, but not automatically brought down on shutdown.

Tested on bionic and focal:

root@rpi-bionic-arm64:~# lsb_release -rd
Description: Ubuntu 18.04.6 LTS
Release: 18.04
root@rpi-bionic-arm64:~# apt-cache policy ifupdown
ifupdown:
  Installed: 0.8.17ubuntu1.1
  Candidate: 0.8.17ubuntu1.1
  Version table:
 *** 0.8.17ubuntu1.1 500
        500 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 Packages
        100 /var/lib/dpkg/status
     0.8.17ubuntu1 500
        500 http://ports.ubuntu.com/ubuntu-ports bionic/main arm64 Packages

root@rpi-focal-arm64:~# lsb_release -rd
Description: Ubuntu 20.04.3 LTS
Release: 20.04
root@rpi-focal-arm64:~# apt-cache policy ifupdown
ifupdown:
  Installed: 0.8.35ubuntu1
  Candidate: 0.8.35ubuntu1
  Version table:
 *** 0.8.35ubuntu1 500
        500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages
        100 /var/lib/dpkg/status

I can't easily test on jammy, as we're not producing jammy images yet; but I'm happy to create one (or try upgrading a pi from focal) if people think it's likely to do something interesting.

Revision history for this message
Gaelan Steele (gaelans) wrote :

Can reproduce on Jammy.

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.