Autor: Laurent Bercot Data: A: dng Assumpte: Re: [DNG] [announce] s6-rc,
a s6-based service manager for Unix systems
On 25/09/2015 09:26, Jaromil wrote: > What I'm particularly interested is something to do process monitoring
> and respawning for a certain group of daemons
Just supervise the daemons you want to supervise, and don't
supervise the ones you don't want to. But really, there's no
reason *not* to supervise every daemon on your system: even if
you're not using the respawning mechanism, it gives you a
reproducible environment to start them (without 40 lines of
boilerplate) as well as a nice, race-free interface to send
them signals - no .pid files.
The only reason why supervision is not more widespread is
inertia. There's a huge historical collection of sysv-rc-like
scripts that does not play well with supervision, and rewriting
them requires a tremendous effort. But I'm hopeful: since the
init wars, people have realized that some work was necessary.
There are initiatives to develop collections of supervision
scripts already. And daemon authors have started putting in the
effort to write systemd .service files, when supervision scripts
are easier, so there's no reason they can't be convinced.
> I wish to have something
> that is not a lousy shell-script (and of course not a monster of
> office-suite dimensions taking over the whole setup) to notice the
> crash, save the logs aside and restart the daemon - and fast.
That's exactly what a supervision suite does. You could already
do it with daemontools in 1998! :P
Nowadays, supervision suites are a dime a dozen. Of course, I'm
advertising s6, the one I wrote - but it is honestly more featureful
than the other ones, and, I like to think, correctly maintained.
> It has been since the times of Icecast1 (pre-kh) that I need something
> like that, been using restartd for a quick setup, but it does not handle
> dependencies.. now wondering if s6-rc does it.
s6 does it. s6-rc is not a supervision suite, it's a service manager
working on top of s6. The distinction is important:
- booting a machine (s6-linux-init),
- supervising processes (s6), and
- managing services (s6-rc)
are not the same job, even if they are somewhat related. It's the
confusion between those three jobs that led to the birth of
mediocre software like sysvinit (I'm not hating: we didn't know
better at the time), and later on, of abominations like systemd
(I *am* hating).
But yes, if all you need is process supervision, s6, or any
other supervision suite, is what you need. If you need dependency
management, especially between oneshots and longruns, then s6-rc
can do it.
> In general I'd be incline to use s6 more because the whole suite Laurent
> is developing seems very minimal and... no-bullshit (Gandi's tm)
It's Gandi's motto (I like those guys, my VPS is hosted by them,
I have a few of their T-shirts), it's the suckless philosophy,
and it's mine. I like to think it's also the philosophy of
Devuan people, who voluntarily rejected the biggest bullshit of
the decade.