From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8191 invoked from network); 18 Aug 2022 12:40:40 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 18 Aug 2022 12:40:40 -0000 Received: (qmail 12034 invoked by uid 89); 18 Aug 2022 12:41:05 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 12027 invoked from network); 18 Aug 2022 12:41:05 -0000 Date: Thu, 18 Aug 2022 14:39:36 +0200 From: Oliver Schad To: supervision@list.skarnet.org Subject: Re: Pattern for multiple subservices and dynamic discovery i.e. VPN Message-ID: <20220818143936.439ce5cc@flunder.oschad.de> In-Reply-To: <20220818100425.GA11301@hcoop.net> References: <20220817103258.59b7f3a0@flunder.oschad.de> <20220818113230.11f70deb@flunder.oschad.de> <20220818100425.GA11301@hcoop.net> Organization: Automatic Server AG X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/bRdV/nBuMHRAKdo5xoVx+lN"; protocol="application/pgp-signature"; micalg=pgp-sha1 --Sig_/bRdV/nBuMHRAKdo5xoVx+lN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 18 Aug 2022 06:04:25 -0400 Davor Ocelic 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: >=20 > > - we need an scanning component for the desired state of running > > instances (something like 'find /etc/openvpn -name "*conf"') =20 >=20 > 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). >=20 > After it sees that a change in a directory has occurred (let's say a > file was added), then it does the following: >=20 > - 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 --=20 Automatic-Server AG =E2=80=A2=E2=80=A2=E2=80=A2=E2=80=A2=E2=80=A2 Oliver Schad Gesch=C3=A4ftsf=C3=BChrer 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 --Sig_/bRdV/nBuMHRAKdo5xoVx+lN Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQR7zzwbEv6+GMBe8mxGKXFRS5aW8AUCYv4zCAAKCRBGKXFRS5aW 8L+GAKCb3C2q2h9wUDBJ76Sthqdhk/HyUQCaA59itgVCvdF7wYDwnHcZsqJ+R7o= =fWyL -----END PGP SIGNATURE----- --Sig_/bRdV/nBuMHRAKdo5xoVx+lN--