Re: s6-svstat "want up"

From: Buck Evan <buck_at_yelp.com>
Date: Tue, 8 Sep 2015 14:47:59 -0700

An error would solve my issue, but the other data in the output seem valid.
Ideally I think it would say:

$ s6-svstat date/
unsupervised (exitcode 0) 10 seconds, normally up

As precedent, daemontools reports:

$ svstat date
date: supervise not running


My concrete issue is that there's no way for me to programmatically
distinguish between the cases of "stop and exit" and "restarting due to
exit", which are chiefly different in whether the service has supervision.
I suppose I could run svok to supplement the svstat data.

On Tue, Sep 8, 2015 at 2:32 PM, Laurent Bercot <ska-skaware_at_skarnet.org>
wrote:

> On 08/09/2015 22:36, Buck Evan wrote:
>
>> $ s6-svc -dx date/
>> [5] Done s6-supervise date
>>
>
> When you tell s6-supervise to exit, it does not update the
> status file before exiting. It's unnecessary, because whether
> the service is "up" or "down" becomes nonsensical: it's
> simply unsupervised, and you should not s6-svstat such a
> service directory.
>
>
> $ s6-svstat date/
>> down (exitcode 0) 6 seconds, normally up, want up, ready 6 seconds
>> (...)
>> $ s6-svstat date/
>> down (exitcode 0) 10 seconds, normally up, want up, ready 10 seconds
>> (...)
>> The "want up" here seems patently false.
>>
>
> Yes. You cannot trust s6-svstat when you run it on a service
> directory that doesn't have a s6-supervise running. It's neither a
> bug nor a feature, you are just invoking undefined behaviour.
>
> I could probably make s6-svstat exit with a specific error code
> and message in that case, if you wish.
>
> --
> Laurent
>
>
Received on Tue Sep 08 2015 - 21:47:59 UTC

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