Running ifup@ for all interfaces breaks no-auto-down
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/
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-
Description: Ubuntu 18.04.6 LTS
Release: 18.04
root@rpi-
ifupdown:
Installed: 0.8.17ubuntu1.1
Candidate: 0.8.17ubuntu1.1
Version table:
*** 0.8.17ubuntu1.1 500
500 http://
100 /var/lib/
0.8.17ubuntu1 500
500 http://
root@rpi-
Description: Ubuntu 20.04.3 LTS
Release: 20.04
root@rpi-
ifupdown:
Installed: 0.8.35ubuntu1
Candidate: 0.8.35ubuntu1
Version table:
*** 0.8.35ubuntu1 500
500 http://
100 /var/lib/
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.
Can reproduce on Jammy.