runit problem with sv check? Or misreading the manual page?

From: Luke Diamand <luke_at_diamand.org>
Date: Sat, 03 Jan 2015 12:05:21 +0000

I'm trying to write a ./run file for autofs which will wait for ypbind
to come up before starting autofs.

I've got a line in autofs/run that says:

   sv check ypbind

and then a ./check script inside the ypbind directory which runs ypwhich.

The man page for 'sv' seems to imply that if the requested state of the
service is 'up' it will run my check script.

However, I'm finding that quite often, the check script doesn't get run.

In the cases where it fails, 'sv status ypbind' says:

down: ypbind: 0s, normally up, want up; down: log: 0s, normally up, want up

It somewhat looks as though if the service is down, the ./check script
won't be run, regardless of the requested state.

I could be wrong about this, but is the problem that runsvdir just
starts all the runsv instances in sequence, so my autofs service is
being started when the ypbind service is still down, with a requested
state of down?

Thanks!
Luke
Received on Sat Jan 03 2015 - 12:05:21 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC