:: Re: [DNG] Openrc
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Steve Litt
Datum:  
To: dng
Betreff: Re: [DNG] Openrc
On Fri, 16 Sep 2016 12:15:01 +0100
KatolaZ <katolaz@???> wrote:

> On Fri, Sep 16, 2016 at 12:24:45PM +0200, Didier Kryn wrote:
>
> [cut]
>
> >
> >     Steve,

> >
> >     I like more and more this idea of separating the tasks:
> >      - pid1 (sysvinit or whatever) performs one-shot startups and
> > basic supervision (like for getty),
> >      - services needing a sophisticated supervisor use a supervisor
> > which is only a supervisor, not pid1,
> >      - services which depend on conditions use specialized tools to
> > wait for these conditions.

> >
>
> That looks like a great plan, but who will supervise the supervisors?
> :)
>
> I admit this might seem like a stupid comment, at least at first
> sight, but whenever you introduce a supervision system under unix you
> most probably end up deciding that the supervision should be delegated
> to pid1, since pid1 is the only process able to guarantee that
> supervision will be working, whatever happens.


Hi KatolaZ,

The preceding paragraph represents a philosophy more than anything
else. It's the philosophy that your computer must never, ever, for any
reason ever become unresponsive. You share that philosophy with Laurent
Bercot, the developer of the s6 (and s6-rc) init systems. He built s6
such that pid1 can always respawn more stuff: The supervisor is in PID1.

I don't share this philosophy. I've never had it happen to me, but if
somehow my (non-pid1) supervisor ever dies and I don't have a terminal
on which to rerun it, then PID1 is unreachable, and I have to either
Ctrl+Alt+Del (if it's enabled and I set up PID1 to do the proper thing
with that interrupt), or power cycle the computer. These occur so
rarely that I'm not at all concerned about them.

So instead of using a product like s6, which has a more complex PID1
that does supervision, I use runit or Suckless Init plus
daemontools-encore plus LittKit or whatever, to obtain the tiniest
possible PID1.

It's funny. Both runit and s6 are inspired by daemontools. Both have
similar syntaxes, and if you can get along in one, you can more or less
get along in the other. Like Spanish and Italian. But they address two
different philosophies.

Anyway, your question about who supervises the supervisors to me
indicates your need for s6. And I'm pretty sure that the new s6-rc
can intermix both respawned and oneshot processes. I've used s6 only a
few times, but my impression is it's the Cadillac of the industry. I
don't have the time to make an s6/s6-rc package, but it would be a cool
addition, assuming it doesn't uninstall the other init systems
installed on the machine.

By the way, s6 and s6-rc appear to be undergoing some pretty heavy
development. Their documentation pages include much more than they did
a year ago.

http://skarnet.org/software/s6-rc/

http://skarnet.org/software/s6/

SteveT

Steve Litt
September 2016 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28