From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM>
To: supervision@list.skarnet.org
Subject: Re: Systemd unit parser and s6 generator
Date: Sun, 9 Apr 2023 08:43:00 +0100 [thread overview]
Message-ID: <e8adc01c-80dd-94b9-fd56-06c6bc990fdb@NTLWorld.COM> (raw)
In-Reply-To: <20230227172516.0d4bb760@flunder.oschad.de>
> [...] 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.
prev parent reply other threads:[~2023-04-10 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 16:25 Oliver Schad
2023-02-28 2:02 ` Laurent Bercot
2023-04-24 8:06 ` Laurent Bercot
2023-04-09 7:43 ` Jonathan de Boyne Pollard [this message]
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=e8adc01c-80dd-94b9-fd56-06c6bc990fdb@NTLWorld.COM \
--to=j.deboynepollard-newsgroups@ntlworld.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).