Comment 5 for bug 702802

Revision history for this message
Tore Anderson (toreanderson) wrote :

Indeed. This happens also with IPv6 interfaces, independently of any specific delay caused by the hardware, as the ifup scripts doesn't ensure that IPv6 Duplicate Address Detection has completed, nor that Stateless Address Auto-Configuration has.

In the following case, /etc/network/interfaces contains the following:

auto eth0
iface eth0 inet6 auto

..and I've also created /etc/init/network-test.conf containing the following:

start on net-device-up IFACE=eth0 ADDRFAM=inet6
exec /sbin/ip a l dev eth0 | logger -t "network-test"

Mar 24 13:53:48 ucstest kernel: [ 21.922952] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 24 13:53:48 ucstest network-test: 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
Mar 24 13:53:48 ucstest network-test: link/ether 00:25:b5:00:00:ce brd ff:ff:ff:ff:ff:ff
Mar 24 13:53:48 ucstest network-test: inet6 fe80::225:b5ff:fe00:ce/64 scope link tentative
Mar 24 13:53:48 ucstest network-test: valid_lft forever preferred_lft forever
Mar 24 13:53:48 ucstest ntpdate[1045]: name server cannot be used: Temporary failure in name resolution (-3)

As you can see, this also broke /etc/network/if-up.d/ntpdate, which could not resolve the NTP server host-name (even if it could, it would have no chance of actually contacting any NTP server in any case).

This makes it pretty hard (impossible?) to write an upstart script that will reliably not run until the network is ready, DNS lookups are possible, and so forth.

Tore