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

From: Avery Payne <avery.p.payne_at_gmail.com>
Date: Sat, 3 Jan 2015 14:51:47 -0800

On Sat, Jan 3, 2015 at 4:05 AM, Luke Diamand <luke_at_diamand.org> wrote:

> 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
>

Try this instead:

sv check ypbind || exit 1

This is crude and will still result in a "restart loop" but it will at
least exit out of ./run completely. Better yet, you can

sv start ypbind || exit 1

and it will either be up and running, or not. Although you'll still have
restart loops if something is wrong.

The runsvdir program, near as I can tell, walks through the directory and
starts a runsv for each definition it finds. There is no apparent sequence
to this - so I can only assume it's starting programs in whatever order
that it reads off of the disk. So, yes, it is entirely possible that
script B will run before script A, but A is needed by B. This is "by
design", the idea being that all programs eventually come up; if something
isn't up yet, it simply waits for it to come up otherwise.

I can't comment on the rest, as I don't use ./check scripts.
Received on Sat Jan 03 2015 - 22:51:47 UTC

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