On Sat, 15 Jul 2017, Guus Sliepen wrote: > On Thu, Jun 29, 2017 at 04:02:56PM +0200, Sven-Haegar Koch wrote: > > > With Debian Jessie I had the following sections in /etc/network/interfaces, > > working fine: > > > > allow-hotplug eth0 > > iface eth0 inet static > [...] > > iface eth0 inet6 auto > [...] > > > > allow-hotplug eth2 > > iface eth2 inet static > [...] > > iface eth2 inet6 auto > [...] > > > > But since the upgrade from Jessie to Stretch eth0/eth2 are not > > activated anymore. > > I've tried to reproduce this but allow-hotplug seems to work fine on all > systems I tried, including VMs. > > > The /etc/init.d/networking script contains a section ifup_hotplug() > > handling this, but the systemd service networking.service is missing it, > > and nothing else seems to replace it if the interface already exists > > at boot time. > > It should be handled by udev: /lib/udev/rules.d/80-ifupdown.rules will > call /lib/udev/ifupdown-hotplug whenever it finds a network device. This > in turn calls systemctl start ifup@$INTERFACE.service, which calls ifup > --allow=hotplug $INTERFACE. > > > As this VM image should work without screaming boot errors even if network > > interfaces are missing I do not want to use "auto ethX" instead - which > > worked with allow-hotplug exactly as wanted in Jessie. > > Can you provide me with the configuration of your VM, and your full > /etc/network/interfaces file?
The /etc/network/interfaces is attached. Ignore the custom "multi-*" settings in there, they are used by an /etc/network/if-up.d script setting up firewalling. The VM is a VirtualBox (from Debian Unstable) with two virtual e1000 network interfaces, both connected to different host-only adapters. Could this related to my "ln -s /dev/null /etc/systemd/network/99-default.link" trying to get rid of that ugly enFOO interface renaming introduced in Stretch? Right now I am using the attached networking-hotplug.service / networking-hotplug-ifup.sh combo to work around it, practically extracted the --allow=hotplug part of the /etc/init.d/networking script. c'ya sven-haegar -- Three may keep a secret, if two of them are dead. - Ben F.
auto lo allow-hotplug lo iface lo inet loopback multi-usage lan allow-hotplug eth0 iface eth0 inet static address 192.168.151.130 netmask 255.255.255.0 gateway 192.168.151.1 multi-usage wan multi-gateway 192.168.151.1 iface eth0 inet6 auto accept_ra 2 dhcp 0 dad-attempts 0 request_prefix 0 allow-hotplug eth2 iface eth2 inet static address 172.30.2.1 netmask 255.255.255.0 multi-usage lan iface eth2 inet6 auto accept_ra 0 dhcp 0 dad-attempts 0 request_prefix 0 allow-hotplug eth1 iface eth1 inet manual address 172.30.4.1 netmask 255.255.255.0 multi-usage lan pre-manual-type static iface eth1 inet6 manual accept_ra 0 dhcp 0 dad-attempts 0 request_prefix 0 pre-manual-type auto allow-hotplug eth3 iface eth3 inet static address 10.1.1.1 netmask 255.255.255.0 multi-usage lan iface eth3 inet6 auto accept_ra 0 dhcp 0 dad-attempts 0 request_prefix 0 allow-hotplug idrac iface idrac inet static label iDRAC 7+ virtual interface multi-usage lan address 169.254.0.2 netmask 255.255.255.0 iface idrac inet6 auto accept_ra 0 dhcp 0 dad-attempts 0 request_prefix 0
networking-hotplug-ifup.sh
Description: Bourne shell script
[Unit] Description=Raise network interfaces marked as allow-hotplug DefaultDependencies=no Wants=network.target After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service systemd-modules-load.service networking.service Before=network.target shutdown.target network-online.target Conflicts=shutdown.target [Install] WantedBy=multi-user.target WantedBy=network-online.target [Service] Type=oneshot EnvironmentFile=-/etc/default/networking ExecStartPre=-/bin/sh -c '[ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --allow=hotplug --exclude=lo)" ] && udevadm settle' ExecStart=/usr/local/superclick/lib/networking-hotplug-ifup.sh ExecStop=/bin/true RemainAfterExit=true TimeoutStartSec=5min