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
Subject: Re: Pattern for multiple subservices and dynamic discovery i.e. VPN
Date: Thu, 18 Aug 2022 14:39:36 +0200	[thread overview]
Message-ID: <20220818143936.439ce5cc@flunder.oschad.de> (raw)
In-Reply-To: <20220818100425.GA11301@hcoop.net>

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

On Thu, 18 Aug 2022 06:04:25 -0400
Davor Ocelic <docelic-skarnet@spinlocksolutions.com> wrote:

> On Thu, Aug 18, 2022 at 11:32:30AM +0200, Oliver Schad wrote:
> How about an approach that would be more tightly integrated
> with s6? For example:
> 
> > - we need an scanning component for the desired state of running
> >   instances (something like 'find /etc/openvpn -name "*conf"')  
> 
> Right, the scanning component would be the key part. Ideally it
> would use inotify so that it doesn't have to poll and also it would
> get the type of event automatically (file created or file deleted).
> 
> After it sees that a change in a directory has occurred (let's say a
> file was added), then it does the following:
> 
> - It creates the appropriate service directory for this particular
>   VPN config (possibly based on a template)
> - It calls s6-svlink or the like to register the new service, which
>   automatically also notifies s6-svscan that a new service has been
>   added

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.

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.

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.

Best Regards
Oli

-- 
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 12:40 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 [this message]
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=20220818143936.439ce5cc@flunder.oschad.de \
    --to=oliver.schad@automatic-server.com \
    --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).