Package: ifupdown Version: 0.8.41 Followup-For: Bug #832134 Dear Maintainer,
When an interface has both auto and allow-hotplug, and uses DHCP for IPv4, on bootup, there is a race condition between ifup@eth0.service and networking.service. systemd runs both simultaneously, and sometimes networking.service loses the race. networking.service fails to start, and exactly 24 hours later, network drops out. I assume that's because of a DHCP lease issue. Removing the allow-hotplug appears to fix the problem for us, but having both auto and allow-hotplug is surely a valid configuration. When this happens the start up logs show several separate DHCP attempts, even though the first one was successful, and ultimately networking.service believes it failed to bring up eth0, even though eth0 is fine, because of "RTNETLINK answers: File exists", i.e. it went through DHCP only to discover that the link is already up! IMHO one simple fix would be for ifup@*.service to depend on networking.service. -- Package-specific info: --- /etc/network/interfaces: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # This was a default configuration, which set allow-hotplug. It then got # combined with the interfaces.d config below, resulting in an interface # which has both allow-hotplug and auto. allow-hotplug eth0 iface eth0 inet dhcp # ... # The below is from an old cloud-init generated config, we moved it into # /etc/network/interfaces recently. When it was crashing, the below was # a separate file. auto lo iface lo inet loopback dns-nameservers # IP addresses auto eth0 iface eth0 inet dhcp mtu 1500 # control-alias eth0 iface eth0 inet6 static address # IPv6 address omitted post-up route add -A inet6 default gw REDACTED || true pre-down route del -A inet6 default gw REDACTED || true # Set this one last, so that cloud-init or user can # override defaults. source /etc/network/interfaces.d/* --- /etc/network/interfaces.d/*: cat: '/etc/network/interfaces.d/*': No such file or directory --- up and down scripts installed: /etc/network/if-down.d: total 8 -rwxr-xr-x 1 root root 372 Feb 20 2019 openvpn -rwxr-xr-x 1 root root 759 Dec 9 2022 resolved /etc/network/if-post-down.d: total 4 -rwxr-xr-x 1 root root 1812 Jun 25 2022 ifenslave /etc/network/if-pre-up.d: total 8 -rwxr-xr-x 1 root root 7214 Jun 25 2022 ifenslave /etc/network/if-up.d: total 16 -rwxr-xr-x 1 root root 1749 Jun 25 2022 ifenslave -rwxr-xr-x 1 root root 385 Feb 20 2019 openvpn -rwxr-xr-x 1 root root 4663 Dec 9 2022 resolved -- System Information: Debian Release: 12.8 APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-28-cloud-amd64 (SMP w/8 CPU threads; PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ifupdown depends on: ii adduser 3.134 ii iproute2 6.1.0-3 ii libc6 2.36-9+deb12u9 Versions of packages ifupdown recommends: ii isc-dhcp-client [dhcp-client] 4.4.3-P1-2 Versions of packages ifupdown suggests: pn ppp <none> pn rdnssd <none> -- no debconf information