Re: Some suggestions about s6 and s6-rc

From: Steve Litt <slitt_at_troubleshooters.com>
Date: Sat, 19 Sep 2015 18:23:41 -0400

On Sat, 19 Sep 2015 11:11:37 -0700
Avery Payne <avery.p.payne_at_gmail.com> wrote:

> With regard to having scripted placement of down files, if it was in a
> template or compiled as such, then the entire process of writing it
> into the definition becomes trivial or moot. While there should
> always be a manual option to override a script, or the option to
> write one directly, I think the days of writing all of the
> definitions needed by hand have long since past.
>
> But there is an issue that would keep this idea from easily
> occurring. You would need to find a way to signal the daemon that it
> the system is going down, vs. merely the daemon going down.

I solved all this stuff, with LittKit, by defining files "reallydown"
and "nodown", signifying "yes, this service truly is supposed to be
down", and "this is the first service to run", respectively. I've
tested it with s6 and with daemontools-encore (slightly different
versions of the shellscripts), it works perfectly.

Basically, on startup, before bringing up the process supervisor, you
write "down" files to every service not containing a "nodown". Then you
erase down files one at a time.

LittKit in no way requires any modification to the supervision system.
If the supervisor does what original daemontools does with the "down"
file, LittKit can bring up services (and oneshots) one at a time,
intermixing services and oneshots.

Here's the LittKit README:

http://troubleshooters.com/projects/littkit/README

I'm not saying nine little shellscripts is the best solution to the
situation, but it's not all that tough a situation.

SteveT

Steve Litt
August 2015 featured book: Troubleshooting: Just the Facts
http://www.troubleshooters.com/tjust
Received on Sat Sep 19 2015 - 22:23:41 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC