[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

non-event-based init systems are unfixable [Was: Re: RFC: OpenRC as Init System for Debian]

On Sun, Apr 29, 2012 at 03:59:03PM +0200, Stephan Seitz wrote:
> On Sun, Apr 29, 2012 at 10:33:16PM +0900, Miles Bader wrote:
> >Isn't mounting filesystems, which can depend on the network, part of
> >the boot process?

> Yes, but how do you check if the network is configured and operational?
> - when the link is up?
> - when the IP address is configured (how do you check this with
> IPv6?)?    What are you doing if more than one IP address is
> configured for this   NIC or more than one NIC is available?
> - when the switch accepts traffic on the port you are connected to?
> - when the router/firewall accepts traffic from your IP address?

Retransmitting your packets because the network is not yet delivering them
is an entirely different error handling scenario from rebinding because your
service was started before the system has an address (or interface).  The
former is handled transparently by the protocol stack and the latter
requires every application to handle it manually - and the only way the
application can handle it is by stupid polling.

Linux is an event-based system, and we need to do event-based activation of
the software, so that we don't have to patch a hundred processes to poll for
the network to show up underneath them.

The fact that v6 addresses may come and go without generating events seen by
userspace is a deficiency with the current system; but a) it's a solvable
one, b) having reliable events for all the *other* scenarios is a huge
reliability improvement over the sysvinit status quo.

For some insight into how upstart structures its events to ensure reliable
start of network services on boot, see the Upstart Cookbook:


> No event based init system will solve these problems when you have
> dependencies outside the box you are booting. The local admin has to
> check if all timings are right and must adjust them if they are not
> fitting.

IOW, "the admin has to add a bunch of sleep's everywhere"?  Pass, thanks.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Reply to: