From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM>
To: Supervision <supervision@list.skarnet.org>
Subject: svscan and supervise
Date: Sun, 3 Feb 2019 10:39:40 +0000 [thread overview]
Message-ID: <277e527a-912f-d878-fe90-9aec37065b93@NTLWorld.COM> (raw)
In-Reply-To: <bqbqlmzSNJzsTvSRV5wSp6oRvkh4CATkPg6ZWSuBcAL@local>
[-- Attachment #1: Type: text/plain, Size: 3626 bytes --]
Kelly Dean:
> Surely this is a common question.
>
It's a common redesign.
In the original daemontools, |supervise| knows nothing at all about the
difference between "log" and "main" services. Linking up the standard
I/Os with pipes, to connect "main" services to "log" services, and
knowing the directory layout that delineates them, is entirely the
domain of |svscan|, which in its turn knows nothing at all about the
control/status API and about supervision. M. Bercot has stuck with this
design.
As laid out in this Frequently Given Answer
<http://jdebp.eu/FGA/daemontools-family.html>, three of the other
toolsets did not, and went down the path of tighter integration of the
twain. They baked in a relationship between "main" and "log" services.
In the original daemontools design, it was theoretically possible to run
|supervise| under something else, that set up different relationships.
Indeed, in the original daemontools |svscan| came along (in version
0.60) about two years after |supervise| did, /originally/ in early
versions people were expected to run |supervise| directly, and it was
more like |daemon| in its operation. This was until it became apparent
that "dæmonization" is a fallacy, and simply does not work on modern
operating systems where login sessions have gone through too many
one-way trapdoors for escaping to a dæmon context to be viable. Running
dæmons outwith login session context /right from the top/ became the
way, with |svscan| and (the also since much-replaced
<http://jdebp.eu./FGA/inittab-is-history.html#svscanboot>)
|svscanboot|. This was of course how service management had been done
on AIX since 1990 and on AT&T Unix since 1988
<http://jdebp.eu./FGA/unix-service-access-facility.html>.
My nosh toolset did not stick with the original design in this regard,
either. But I did not go for tighter integration, which I thought to be
the wrong thing to do. |service-manager|
<http://jdebp.eu./Softwares/nosh/guide/commands/service-manager.xml>
manages a whole bunch of services, does all of the waiting and spawning
in a single process, which is conventionally also a subreaper, and
provides all of the control/status APIs. But the knowledge of the
relationships amongst those services, and of directory structures, is
entirely /outwith/ that program.
It is, rather, in programs like |system-control|
<http://jdebp.eu./Softwares/nosh/guide/commands/system-control.xml> (in
its |start| and |stop| subcommands) and |service-dt-scanner|
<http://jdebp.eu./Softwares/nosh/guide/commands/service-dt-scanner.xml>.
They decide the policy, which services' standard I/Os are plumbed
together and how a "main" service indicates its "log" service. They
instruct |service-manager| with the |service/| and |supervise/|
directories, passing it open file descriptors for them, and what to
plumb to what, and it just runs the mechanism. They even implement /two
different/ policies, one with ordering and dependency processing and a
full /service bundle/ mechanism and the other more like the old
daemontools and s6 /scan directory/. There is no reason that a third
tool could not implement a third policy still.
There is not even a requirement of a 1:1 relationship between "main" and
"log" services, and indeed the set of pre-supplied service bundles has
fan-in arrangements for a few of the short-lived single-shot services
that run at bootstrap/shutdown, with them sharing a single logger. The
pre-supplied per-user services have three fan-in sets
<http://jdebp.eu./Softwares/nosh/guide/per-user-user-services.html#logging>,
too.
prev parent reply other threads:[~2019-02-03 10:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 18:32 s6 bites noob Kelly Dean
2019-01-31 18:46 ` Kelly Dean
2019-01-31 20:19 ` Laurent Bercot
2019-01-31 21:53 ` svscan --help Jonathan de Boyne Pollard
2019-02-01 0:36 ` s6 bites noob Laurent Bercot
2019-02-01 4:18 ` Kelly Dean
2019-02-01 5:27 ` Colin Booth
2019-02-01 5:29 ` Colin Booth
2019-02-03 8:53 ` Kelly Dean
2019-02-03 10:19 ` Laurent Bercot
2019-02-04 7:42 ` Kelly Dean
2019-02-04 13:52 ` Laurent Bercot
2019-02-05 9:26 ` Kelly Dean
2019-02-05 19:44 ` Laurent Bercot
2019-02-03 10:39 ` Jonathan de Boyne Pollard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=277e527a-912f-d878-fe90-9aec37065b93@NTLWorld.COM \
--to=j.deboynepollard-newsgroups@ntlworld.com \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).