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=-0.7 required=5.0 tests=DATE_IN_PAST_24_48, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13144 invoked from network); 10 Apr 2023 07:43:33 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 10 Apr 2023 07:43:33 -0000 Received: (qmail 8295 invoked by uid 89); 10 Apr 2023 07:43:59 -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 8288 invoked from network); 10 Apr 2023 07:43:59 -0000 X-SourceIP: 82.21.120.173 X-Authenticated-Sender: J.deBoynePollard-newsgroups@NTLWorld.COM X-Spam: 0 X-Authority: v=2.4 cv=I5CjBvsg c=1 sm=1 tr=0 ts=6433be23 cx=a_exe a=ZwFDrNcBZCEFJ5/d6y5G6w==:117 a=ZwFDrNcBZCEFJ5/d6y5G6w==:17 a=IkcTkHD0fZMA:10 a=dKHAf1wccvYA:10 a=rg2V61WcAAAA:8 a=uj8X_y5MAAAA:8 a=5xhaxrNtNH3CwrTAZ6MA:9 a=QEXdDO2ut3YA:10 a=WvBgguq6X7kA:10 a=8c-ZCp-1d_0A:10 a=h2Zpg1Gm_F5nnxfnuFwt:22 a=gp7W3T1CZUxA4ewt6LkN:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1681112611; bh=di2yOlJbW6IIdrjnuzoaCXP6YUI0qpRxrsC9L3xpvIw=; h=Subject:To:References:From:Date:In-Reply-To; b=SgGwPtU+RVtApA0859/lzRP0IuhZ+a9p7qvQpDzM8rwHsRhr+mG68yIHRq/D2x0og KkiFOCbVFkpOMdS2k9L4Rq+dWU5cY4D60RxFi7QcbP56ecrgWeJF/7+4PaBqOCdgEs L/KpCs9Ij8TRVmW/SMH0gQo64MNB8Xfi9dPOuyPibGamU9C8fRqo4MzKVEFsI2veln Yebe46kggFDm6+4+2lQESDyUcGWkngC4WsOTK/HhKRjqHIHoNEvsz1FYkbzuE+Y/zb fdfjqvkS1WJUCyvFMGODn+b6sObSyU0tfo114rXsvLjq3t9YEEiYaCjZ7x5/KldkiA Wy30hYDHWnpaQ== Subject: Re: Systemd unit parser and s6 generator To: supervision@list.skarnet.org References: <20230227172516.0d4bb760@flunder.oschad.de> From: Jonathan de Boyne Pollard Message-ID: Date: Sun, 9 Apr 2023 08:43:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20230227172516.0d4bb760@flunder.oschad.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfE5GxMeJIbz2kgmCkwJjgqimlRA8oMCoD2vD0+S+F/yK9WP7yqBy9h6fl6IAvqh4HOJ9ZU3OmMgcD2UVFGSR7i8N4WMiZQiJdf8IztWma8bKUqTCSInC IS4+iP4+7A761EO0yD2jVoAWSfaCugjXRrtTMs3OxMU60k8DFYY2ACFvPqcOu+S8YA8LefTi6sjLMOo+chrILAHdOhHN3Qvo+VjYK8adtwfo7K03zsw71jpk d/Q38APPc5Z8cpAW9UPpvQ== > [...] We've discussed internally if we change that process and try to > write a systemd unit parser, because all units are there in Ubuntu. If > we could catch 90% of all cases, we need, we would be happy. If it > would take 2 weeks of work, that would be fine. Did somebody of you > try to implement something? What are your thoughts? > So it seems that I am, years later, still the only person in the world to have done this (except not targetting skarnet toolsets). (-: As the voice of experience: Yes, you'll not get total coverage. You'll get "good enough for most cases", though I couldn't put an exact percentage on that. No, with the s6 tooling as it stands, you'll not be able to do everything. One of the things that one has to add is support for systemd's idiosyncratic non-UCSPI TCP/UDP service handling. Contrast the --systemd-compatibility flag to the tcp-socket-listen program in the nosh toolset to what s6-tcpserver4-socketbinder in s6-networking does. * https://jdebp.uk/Softwares/nosh/guide/commands/tcp-socket-listen.xml * https://skarnet.org/software/s6-networking/s6-tcpserver4-socketbinder.html That flag is used by convert-systemd-units to handle the conversion of socket units. * https://jdebp.uk/Softwares/nosh/guide/commands/convert-systemd-units.xml Most of the issues for s6 will be things like that, minor tweaks for (sometimes reasonable, sometimes downright absurd) systemd quirks and the odd missing tool. I wrote a set-control-group-knob command, for example, used by convert-systemd-units to translate the various unit file settings that end up twiddling knobs on control groups. I haven't seen a skarnet tool for doing that, yet; so that will be one necessary addition, for example. * https://jdebp.uk/Softwares/nosh/guide/commands/set-control-group-knob.xml s6-networking also does not appear to have UDP listening tools, which socket units for UDP sockets need. Timer units need tools like time-pause-until and time-env-add, similarly. Notice the --systemd-compatibility flag for that latter, too, and the notions like systemd month lengths. * https://jdebp.uk/Softwares/nosh/guide/commands/time-pause-until.xml * https://jdebp.uk/Softwares/nosh/guide/commands/time-env-add.xml There is, furthermore, a lot of stuff that you'll find that s6/nosh/&c. service run scripts do a lot better than systemd can. As you'll see from the convert-systemd-units(1) manual page, I added quite a number of things to the systemd unit file syntax for things that one can do in the aforementioned, such as UCSPI access control mechanisms (UCSPI being entirely alien to systemd) for starters.