:: Re: [DNG] powerdns upstream has dro…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: onefang
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] powerdns upstream has dropped sysvinit support
On 2023-10-13 09:09:51, Steve Litt wrote:
> 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.


You might be forgetting about ordering? Run things in the correct order,
then you wont have endless testing scripts all waiting for their "needs"
to start up. Sure use the testing scripts is a good idea, but ALSO run
things in the correct order, then the testing scripts wont have to wait
as long.

/me goes back to waking up, then heads out for the day to help run a
street festival.

--
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.