:: Re: [DNG] [announce] s6-rc, a s6-b…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Laurent Bercot
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] [announce] s6-rc, a s6-based service manager for Unix systems
On 28/09/2015 22:05, Rob Owens wrote:
> Here is a real-world scenario that has caused me trouble over the years.
> I have a system that connects wirelessly to my local network. The system
> uses wicd to manage the network connections, and wicd starts at boot.
> This system is supposed to mount several NFS shares on boot, but it
> always fails -- even when using openrc (which is dependency-based) on
> Funtoo.
>
> The problem is that even though wicd has started, it takes several
> seconds (sometimes up to 30 seconds) to acquire an ip address. In the
> meantime, NFS mounts are attempted and fail.


This is typically a problem that is solved by readiness notification:
the wicd service is not ready until later, and what depends on it
should not proceed until it is ready. The service should notify its
readiness to the service manager, which waits for it to resume its
work.

It's the exact kind of situation that s6-rc solves easily: there's
a framework to notify readiness, that can accommodate a script that
polls for it if there's no other way.
And while dependent services are waiting on the network, other things
that do not depend on it can keep getting initialized, so no time is
wasted.

--
Laurent