Re: s6-svstat "want up"

From: Colin Booth <cathexis_at_gmail.com>
Date: Tue, 8 Sep 2015 13:43:48 -0700

On Tue, Sep 8, 2015 at 1:36 PM, Buck Evan <buck_at_yelp.com> wrote:
> Below is a silly toy service that I've used to prove out some of the s6
> behavior.
>
> $ cat date/run
> #!/bin/bash
> exec date > now.date
>
> $ s6-supervise date &
> [5] 3916351
>
> $ cat date/now.date
> Tue Sep 8 13:32:21 PDT 2015
> $ s6-svstat date/
> down (exitcode 0) 0 seconds, normally up, want up, ready 0 seconds
>
> $ cat date/now.date
> Tue Sep 8 13:32:23 PDT 2015
> $ s6-svstat date/
> down (exitcode 0) 0 seconds, normally up, want up, ready 0 seconds
>
> $ cat date/now.date
> Tue Sep 8 13:32:24 PDT 2015
> $ s6-svstat date/
> down (exitcode 0) 0 seconds, normally up, want up, ready 0 seconds
>
> That's all fine and sensical.
>
> $ s6-svc -dx date/
> [5] Done s6-supervise date
> $ s6-svc -dx date/
> s6-svc: fatal: unable to control date/: supervisor not listening
>
> $ s6-svstat date/
> down (exitcode 0) 6 seconds, normally up, want up, ready 6 seconds
> $ cat date/now.date
> Tue Sep 8 13:33:07 PDT 2015
>
> $ s6-svstat date/
> down (exitcode 0) 10 seconds, normally up, want up, ready 10 seconds
> $ cat date/now.date
> Tue Sep 8 13:33:07 PDT 2015
>
> The "want up" here seems patently false.
> The last command sent was "-dx", which tells the thing to go down.
> The "normally up" is fine, since there's no `down` file.
>
> Is this a bug or a feature?
Neither, but it is totally expected. -dx tells s6-supervise to bring
the service down and exit. Which causes s6-svscan to restart
s6-supervise. Which brings up the service.

Runit does the same thing, as does daemontools.

Cheers!

-- 
"If the doors of perception were cleansed every thing would appear to
man as it is, infinite. For man has closed himself up, till he sees
all things thru' narrow chinks of his cavern."
  --  William Blake
Received on Tue Sep 08 2015 - 20:43:48 UTC

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