On Sat, Mar 31, 2018 at 06:01:18PM +0200, Raphaël Halimi wrote: > With /etc/init.d/networking script, network interfaces configured with > class "auto" are raised first, and only when that's done, interfaces > configured with class "allow-hotplug" are then raised: > > ifup -a $exclusions $verbose && ifup_hotplug $exclusions $verbose > > With systemd, the unit file only calls: > > /sbin/ifup -a --read-environment > > ...letting udev (I guess) take care of the interfaces configured with > class "allow-hotplug", the major difference being that both steps are > done concurrently.
Hm, but that is more of a coincidence than by design. Ifupdown still has a udev rule, regardless of the init system, that will bring up hotplug interfaces. Also, the /etc/init.d/networking script might call ifup_hotplug, but this only covers interfaces that are present at boot time, while future hotplugged interfaces might still result in concurrent calls to ifup. > This leads to situation where a given hook in /etc/network/if-*.d can > end up running multiple times simultaneously. Indeed. I can see how this is a problem, but I don't think serializing ifupdown is the right solution. > The NEWS.Debian file's entry for 0.8 states that: > > "Ifupdown will now be more strict when errors occur, and will also > properly return a non-zero exit code when (de)configuring an interface > fails. Please ensure your /etc/network/interfaces is correct and that > your interfaces can be brought up and down without errors, especially > during system startup." > > IMHO, this doesn't emphasize enough on the fact that a given hook in > if-*.d must be able to run several times simultaneously, Yes, that should indeed be emphasized more. And it should be able to run simultaneously both for SysV and systemd, although the problem happens more often with the latter. > I suppose the aggressive parallelizing done by systemd is expected > behavior, Debian's SysV system also runs init scripts in parallel! It's just that the ordering is different than with systemd. I'm not sure why we still call ifup_hotplug from the SysV init script as we also have the udev rule, but it's pure luck that the init script configures the hotplug interfaces before udev runs (unless udev really behaves differently under SysV for some reason). > IMHO, there should be at least some kind of warning documented somewhere You are right. I'll add a an entry to the manual and to NEWS.Debian, so there will be a clear warning when people are upgrading ifupdown. -- Met vriendelijke groet / with kind regards, Guus Sliepen <g...@debian.org>
signature.asc
Description: PGP signature