supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: Supervision <supervision@list.skarnet.org>
Subject: Re: Readiness notification exemplars
Date: Sat, 04 Apr 2020 15:54:12 +0000	[thread overview]
Message-ID: <ema5a08e2e-6171-4ed7-bd82-35d7adec56af@elzian> (raw)
In-Reply-To: <20200404150209.GA564@mail.hallyn.com>

>So the API would be - the thing that starts the daemon opens an fd N,
>the daemon accepts an argument "--ready-fd=N", daemon writes something
>to fd N when ready or just closes it

  Well it has to write something (and in the current version of the
protocol it requires a newline) before closing, else there would be no
telling the difference between readiness and death - which aren't quite
the same thing :) But yes, that's the idea.

  Closing is even optional, but since the supervisor is allowed to stop
reading as soon as it detects a newline, it makes no sense to keep the
fd open after writing the newline.


>  and the thing checking whether
>daemon is ready sees fd activity and starts things depending on the
>daemon?

  Yes. In the s6 model, the thing checking that the daemon is ready is
the supervisor, and it reports readiness to anything that has
subscribed (typically the service manager), which can then act
accordingly.

--
  Laurent



  reply	other threads:[~2020-04-04 15:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 13:23 Brett Neumeier
2020-04-01 13:36 ` Casper Ti. Vector
2020-04-01 14:21 ` Serge E. Hallyn
2020-04-01 15:06   ` Laurent Bercot
2020-04-01 15:28     ` Serge E. Hallyn
2020-04-01 15:59       ` Laurent Bercot
2020-04-01 16:26         ` Serge E. Hallyn
2020-04-01 17:13           ` Laurent Bercot
2020-04-04 15:02             ` Serge E. Hallyn
2020-04-04 15:54               ` Laurent Bercot [this message]
2020-04-03  7:41           ` Jonathan de Boyne Pollard
2020-04-04 15:48             ` Serge E. Hallyn
2020-04-04 21:29               ` Laurent Bercot
2020-04-04 22:18                 ` Serge E. Hallyn
2020-04-07 23:03                   ` Brett Neumeier
2020-04-08 11:02                     ` Laurent Bercot
2020-04-09 10:31                     ` Jonathan de Boyne Pollard
2020-04-01 14:55 ` Laurent Bercot

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=ema5a08e2e-6171-4ed7-bd82-35d7adec56af@elzian \
    --to=ska-supervision@skarnet.org \
    --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).