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@list.skarnet.org
Subject: Re: s6-rc-update does not create pipes when already-running service becomes a consumer
Date: Tue, 26 Sep 2023 19:23:59 +0000	[thread overview]
Message-ID: <em2a52f21b-618b-4f05-ac76-a238a787ee21@bda392e6.com> (raw)
In-Reply-To: <169573880839.4539.10047970009995756240@localhost>


  I agree with all you're saying here...
  ... except that this case makes no sense in the first place. A consumer
and a non-consumer are fundamentally different things.

  A running service that is not a consumer does not read anything on its
stdin. It runs autonomously.
  A consumer, by essence, is waiting on stdin input, in order to process
it and do something with it.

  If a non-consumer were to become a consumer, it would mean its very
nature would be transformed. It would not behave in the same way at all.
And so, it makes no sense for it to be the "same" service. It should not
be treated the same way; it should not keep the same name.

  So, if anything, the change I would make is, when a non-consumer
becomes a consumer, s6-rc-update just throws an error and exits.

  The situation is different with a non-producer becoming a producer,
because a non-producer can already naturally write to its stdout, and
its output simply falls through to the catch-all logger. When becoming
a producer, it just needs to write into a pipe instead, and the pipe
already exists since it's created on the consumer side, which already
exists, so indeed it's all a matter of restarting the service.

--
  Laurent


  reply	other threads:[~2023-09-26 19:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 14:33 Adam Joseph
2023-09-26 19:23 ` Laurent Bercot [this message]
2023-09-27 16:09   ` Samuel Holland

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=em2a52f21b-618b-4f05-ac76-a238a787ee21@bda392e6.com \
    --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).