Comment 12 for bug 580319

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: dhcp3-server launches before upstart brings all interface, thus failing to start

Seems to me that the appropriate time to start dhcpd is when all of the devices it is configured on are up.

The issue here is that /etc/rc2.d/S* are run after this condition is met:

start on filesystem and net-device-up IFACE=lo

Because ifup -a is run in parallel with mountall essentially this is a race between ifup -a bringing up its interfaces and all filesystems mounting. It probably works fine w/ a regular ethernet interface, but like the reporter says, this takes a bit longer for a bridge.

We probably do need to move dhcp server to upstart, *or* rethink the start on for rc-sysinit. In fact, since lo is always configured when ifup -a is run, and 'started networking' is emitted after ifup -a exits with success, it would make sense to change rc-sysinit to this:

start on filesystem and started networking

This would probably solve a lot of issues with server network services that need all interfaces to be up and configured. On the desktop, this could slow the boot by the time between emitting 'net-device-up' for lo and ifup -a exitting.. which I would suspect is in the ballpark of "a few milliseconds" at the most. However there are plenty of other things happening in parallel at this point so its not a total loss.

This is a somewhat radical change, and probably not going to be SRU-able. For the stable releases, it may be better for users to modify /etc/init/rc-sysinit.conf themselves to enact this behavior now.