Re: s6-rc-update does not create pipes when already-running service becomes a consumer

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Tue, 26 Sep 2023 19:23:59 +0000

  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
Received on Tue Sep 26 2023 - 21:23:59 CEST

This archive was generated by hypermail 2.4.0 : Tue Sep 26 2023 - 21:24:28 CEST