Re: Unexpected behavior when updating exclusive policy package

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Tue, 20 Oct 2020 16:05:36 +0000

  s6-rc-update has a mechanism to help people give instructions on how
to switch databases: the conversion file. However, it is a difficult
tool to use in automated scripts such as svctl, because it requires
writing a file by hand: it has been designed to help smoothen the
transition between two wildly different sets of services, and is too
heavy to use in simple cases such as a service addition.

  Additionally, the conversion file does not have an instruction that
says "do not restart this service chain", so it's not applicable in
this case. But it's something I will probably implement in the next
version of s6-rc, which I'm currently working on, so eventually there
will be a way to configure the restarting behaviour.

  In the meantime, Casper's suggestion is how I would do it, and I
recommend using it if you are adding services early in the graph and
want to avoid long restart chains:

>I did this in two steps (of course, both after first checking that the
>service runs correctly and that `s6-rc-update -n' outputs were right):
>* Add the new service, without declaring any dependencies on it; compile
> the service database, and run `s6-rc-update'.
>* `s6-rc -u change' the new service, then declare any dependency on the
> service; compile the database again, and run `s6-rc-update' again.

  This is the natural workaround to s6-rc's behaviour. No restarts will
occur on the second update, because all required services are already
up so no dependencies need to be enforced via restarts.

--
  Laurent
Received on Tue Oct 20 2020 - 16:05:36 UTC

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