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: Pattern for multiple subservices and dynamic discovery i.e. VPN
Date: Thu, 18 Aug 2022 16:36:24 +0000	[thread overview]
Message-ID: <em4c2928a9-deee-4be8-939a-f64dba7634c1@a67d8a73.com> (raw)
In-Reply-To: <20220818143936.439ce5cc@flunder.oschad.de>


>That would just move 3 components to another level but they are
>still needed: scanning existing service directories, diffing between
>desired and current state and applying - so creating or removing
>directories.

  So, diffing between desired and current state, and applying the
modifications are components of a *service manager*, not a supervision
suite, and it is important to maintain the distinction in order to
avoid scope creep in s6.

  Even when a service is *not* instanced, these components are somewhat
needed; it's just not noticed because their implementation over a
single supervised service is trivial. But it is important to remember
that the job of a supervision suite is to maintain the service in its
current state (up or down), *not* to manage the wanted state or apply
it. (Of course, it does provide tools to perform state transitions
for longruns, but it comes with no policy on when to call these tools.)

  The components you want definitely have their place in s6-rc; but in
the meantime, they can also be scripted on top of regular s6 if you
have a good modelization for implementing instances, which I will add
in the near future.


>I see there a problem with multiple dynamic services. I'm not sure
>about concurrency behaviour of updating processes in the service
>directory. Maybe Laurent can explain problems in that area, if they
>exist.

  s6 manages processes and every supervised process needs its own
service directory. There will be as many service directories as
they are instances. (Some components of a template service directory
can of course be reused.) So there's no concurrency issue; however,
the instance management tool I'm thinking of could adopt various
updating methods depending on what you want. Best effort? Clean
shutdown, service replacement, then firing up of the new service's
instances? Rolling upgrade across the instances? These policies all
have their uses.


>I'm not sure how complex the supervision itself is - however I would
>love to solve the problem without doing supervision on my own. I
>thought about your approach as well but it really depends how resilient
>an update process is.

  It will definitely be resilient, but there are several ways to 
implement
it, see above.

--
  Laurent


  reply	other threads:[~2022-08-18 16:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17  8:32 Oliver Schad
2022-08-17 11:04 ` Laurent Bercot
2022-08-18  9:32   ` Oliver Schad
2022-08-18 10:04     ` Davor Ocelic
2022-08-18 12:39       ` Oliver Schad
2022-08-18 16:36         ` Laurent Bercot [this message]
2022-08-18 18:18         ` Davor Ocelic
2022-08-18 11:40     ` 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=em4c2928a9-deee-4be8-939a-f64dba7634c1@a67d8a73.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).