|| ||Russ Allbery <rra-AT-debian.org> |
|| ||debian-devel-AT-lists.debian.org |
|| ||Re: RFC: OpenRC as Init System for Debian |
|| ||Thu, 26 Apr 2012 17:02:22 -0700|
|| ||Article, Thread
Petter Reinholdtsen <firstname.lastname@example.org> writes:
> Say you want to mount a network disk during boot. This depend on the
> network being configured. This in turn might depend on a DHCP reply
> from a DHCP server, and to send the DHCP request the network card need
> to be detected. To detect the network card, the network driver need to
> be loaded, and the network card need to be found on the PCI or some
> other internal bus. And with the Linux kernel today, there is no way to
> know when during boot the network card will be found on the bus. To
> make this work reliably, the boot system need to be event based, not
> sequence based.
And lest someone think this is a theoretical exercise, we *frequently* get
bugs filed against packages like OpenAFS, the Kerberos KDCs, or OpenLDAP
that are boot-order-dependent and network-dependent and either don't start
or start in unuseful ways or at unuseful times because of lack of event
notification for when interfaces are *actually* ready or when network
devices are *really* available.
These bugs are essentially unresolvable without something that understands
kernel events and can use them as input into boot dependency processing.
This is why so many packages resort to adding "sleep" calls with random
delays to their init scripts in the hope that everything will be ready
after some arbitrary delay.
The alternative is to add significantly additional complexity to every
package like those listed above that needs the network to loop and retry
if the network isn't available when it first starts. This is a huge waste
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>
to post comments)