On Thu, 18 Aug 2022 06:04:25 -0400 Davor Ocelic <docelic-skar...@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.sc...@automatic-server.com Tel: +41 71 511 31 11 | Mobile: +41 76 330 03 47
pgpObylnQ62PO.pgp
Description: OpenPGP digital signature