Re: patch: sv check should wait when svrun is not ready

From: Buck Evan <>
Date: Tue, 10 Feb 2015 09:17:13 -0800

That's not entirely on topic. In the scenario I'm trying to address, svrun
(or runit) isn't entirely started when another process runs sv-check.

No amount of fiddling some run script would help under those circumstances.

--phone is hard.
On Feb 10, 2015 1:53 AM, "Crest" <> wrote:

> On 10.02.2015 02:55, Buck Evan wrote:
>> Essentially, if `sv check` is run too soon after `runsv` (or runit for
>> that
>> matter), it will immediately fail without waiting for runsv to come up. In
>> my particular use case, runit is running inside a (detached) docker, and
>> I'm using `sv check` to wait for my dockerized service to be ready, which
>> I
>> think is a good use case for `sv check`. Without this patch, I'm forced to
>> write some code which re-runs `sv check` if it fails before $SVWAIT
>> seconds, which sounds awfully like the behavior of sv-check itself.
> I use something like this in my ./run scripts:
> NAME='foo'
> DEPS='baz baz'
> export SVWAIT=1
> while ! sv start $DEPS >/dev/null
> do
> echo "Waiting for $DEPS required by $NAME."
> done
> unset SVWAIT
> Don't use this unless your service has a ./check script because it blocks
> the service until the dependencies are met.
Received on Tue Feb 10 2015 - 17:17:13 UTC

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