supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Oliver Schad <oliver.schad@automatic-server.com>
To: supervision@list.skarnet.org
Cc: "Laurent Bercot" <ska-supervision@skarnet.org>
Subject: Re: Pattern for multiple subservices and dynamic discovery i.e. VPN
Date: Thu, 18 Aug 2022 11:32:30 +0200	[thread overview]
Message-ID: <20220818113230.11f70deb@flunder.oschad.de> (raw)
In-Reply-To: <em185114e4-85fb-4d5a-bda7-ddf78f0e5065@21798dd2.com>

[-- Attachment #1: Type: text/plain, Size: 2060 bytes --]

Dear Laurent,

thanks a lot for your quick response. I understand, that dynamic
discovery needs some thoughts to implement in an easy and flexible way.

Just to understand the requirements, if we want to implement that today:

- we need an scanning component for the desired state of running
  instances (something like 'find /etc/openvpn -name "*conf"')
- we need an scanning component for the current state in process list
- we need a diffing component
- we need a state applier component

A component could be a shell function. Applying state would mean to
fork and exec. A process tree would look like

/usr/bin/s6-svscan
 s6-supervise vpn-manager
   vpn-manager
     openvpn foo1.conf
     openvpn foo2.conf

Best Regards
Oli

On Wed, 17 Aug 2022 11:04:50 +0000
"Laurent Bercot" <ska-supervision@skarnet.org> wrote:

> >
> >I'm looking for a pattern to solve a problem, where you have to
> >discover dynamically the services you have to start.
> >
> >Examples could be VPN configurations, where you discover the
> >configuration files and start for every file an instance of the VPN
> >service.  
> 
>   Hi Oliver,
> 
>   Dynamic instantiation is a real pain point - it's an often requested
> feature, but it's surprisingly hard to make it work correctly and
> safely in a supervision scheme. Supervision works very well in static
> environments, but dynamic discovery is at odds with the architecture.
> 
>   I have a few ideas to mitigate that and help people create instanced
> services. Instantiation is a planned feature of the future s6-rc v1
> but it's still a ways away; I am also thinking of adding tools to help
> people handle instances with regular s6, amd they may come in the near
> future, but there are currently no such helpers, sorry.
> 
> --
>   Laurent
> 



-- 
Automatic-Server AG •••••
Oliver Schad
Geschäftsführer
Hardstr. 46
9434 Au | Schweiz

www.automatic-server.com | oliver.schad@automatic-server.com
Tel: +41 71 511 31 11 | Mobile: +41 76 330 03 47

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2022-08-18  9:33 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 [this message]
2022-08-18 10:04     ` Davor Ocelic
2022-08-18 12:39       ` Oliver Schad
2022-08-18 16:36         ` Laurent Bercot
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=20220818113230.11f70deb@flunder.oschad.de \
    --to=oliver.schad@automatic-server.com \
    --cc=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).