On Tue, Sep 8, 2015 at 1:43 PM, Colin Booth <cathexis_at_gmail.com> wrote:
> 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!
Oops, missed that you weren't running a full supervision tree. I think
it's an oversight and s6-supervise is handling the exit before it
updates the status files.
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:47:22 UTC