:: Re: [DNG] powerdns upstream has dro…
Pàgina inicial
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
A: dng
Assumpte: Re: [DNG] powerdns upstream has dropped sysvinit support
tito via Dng said on Thu, 12 Oct 2023 08:38:51 +0200

>Hi,
>
>I would suggest instead rather than orphan-sysvinit-scripts, s6
>scripts, runit scripts, who knows scripts... to create a collection of
>definition files per service with the needed variables


Let's kick this around a little bit...

>(needs, provides,


Those are kind of meaningless in runit although I'm pretty sure they're
vital in systemd, sysvinit, and I think s6 if you do s6 the new way. So
for runit and old-school s6, "needs" and that systemd "startafter" and
"startbefore" stuff boil down to "what needs to be running before this
daemon starts?" And unlike systemd and the new s6, the already started
dependency daemon hasn't set a flag saying it's running, nor has it
(for sysvinit) backgrounded itself to say it's running. Instead, in
runit you test for the dependency being running. For instance, if the
dependency is the network, you can ping 8.8.8.8 and if it fails, exit 1
and let runit try again in a second or five or whatever.

This "test" method sounds like a kludge, but it's actually better
because it tests what you need, not what the daemon said when it
supposedly became effective. If you need MariaDB running, you can test
with a read for a table you know is in a known database, instead of
hoping systemd's right about saying that it's running. So in the tito
file you need test scripts for each dependency, and each test script is
probably about 1 to 3 lines, but they are code, not key value pairs.

Another situation is where you must shut down one daemon before
shutting down another. I think the usual example of this is you must
shut down your database before shutting down nfs. Any such relationship
must be in the tito file.

>daemon, options to run in foreground, options to run
>in background, options to log, options for pidfile, run as user, run
>as group,


I think you've pretty much covered it, unless you want it to enable one
to create a unit file from the tito file, but that decision would be
political and strategic, seeing as the unit files will always be
available until systemd goes away.

By the way, I'm pretty sure that if each "must start A before starting
B" and each "must kill C before killing D" is listed in the tito file,
sysvinit S and K numbers can be calculated. I think the make program
might be helpful in doing this.

SteveT

Steve Litt

Autumn 2023 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21