Package: ifupdown
Version: 0.8.8
Severity: important

Hello

I have been having a problem where my network devices are not being configured 
properly on boot. I suspect that my problems are caused in a fundamental 
oversight 
in the /etc/init.d/networking init script, though I'm not sure.

/etc/init.d/networking calls "udevadm settle" to determine when device drivers 
are 
loaded and network devices exist. However, that's not what "udevadm settle" 
does. 
"udevadm settle" returns before drivers have finished loading and before 
devices 
exist. As a result, it is possible for ifup to try and start network interfaces 
on devices which don't exist yet.

I don't know if ifup itself may have some internal checking to make sure that 
devices actually exist. If it does, than this checking is insufficient. If it 
does not, then the situation is even worse than I suspected.

In my particular case, I have a bridge interface with eth0 and wlan0 members. I 
find it common that the wlan0 interface has not finished loading the driver 
when the bridge attempts to start. I have several "pre-up" commands required 
for 
my setup, and they fail because the devices onto which the commands rely don't 
yet exist (iw or ethtool as examples).

The solution to this problem is that the init script must wait for these 
network 
devices to exist. Before they exist, it does not seem appropriate for ifup to 
be 
called.

It is notable that in my particular case, ifquery simply returns the name of my 
bridge interface, br0, and not the member interfaces (eth0 and wlan0, since 
they 
have no normal config stanzas). Thus, ifquery will probably need to know about 
these interfaces for the init script to wait for them.

One possibility is that I should add a config like this, but this might not be 
a great idea for all types of special interface configs (LACP bundles come to 
mind):
        auto eth0
        iface eth0 inet manual

Alternatively, a new configuration parameter indicating a device dependency, 
such 
as "waitdev wlan0" might be appropriate.

I don't know what the right solution is here. Feedback would be apreciated.



For now, as a workaround, I can do something horrible like this in my bridge 
interface config:
        pre-up while ! [ -e /sys/class/net/wlan0 ] ; do echo "dev wlan0 not 
ready!" ; sleep 0.25 ; done



Please advise



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ifupdown depends on:
ii  adduser              3.113+nmu3
ii  init-system-helpers  1.25
ii  iproute2             4.3.0-1
ii  libc6                2.21-6
ii  lsb-base             9.20160110

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.3-5

Versions of packages ifupdown suggests:
pn  ppp     <none>
pn  rdnssd  <none>

-- debconf-show failed

Reply via email to