Re: s6-rc-update initial findings

2015-09-14 Thread Colin Booth
On Mon, Sep 14, 2015 at 4:44 PM, Laurent Bercot  wrote:
>  Yeah, that's not normal. s6-rc-update should remove the links when it
> brings the old services down, and should also add the links when it
> brings the new services up. I don't have an exact picture of what is
> actually happening in all cases; I didn't have the time today, but I'll
> do more testing on that tomorrow.
>
No worries. I just wanted to get that stuff reported while it was
still fresh in my head.

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


Re: s6-rc-update initial findings

2015-09-14 Thread Laurent Bercot

On 15/09/2015 00:40, Colin Booth wrote:

Ok, did some more testing and it looks like the contents of $SVCDIR
end up being the additive delta between current and new. When
initializing, there are no s6-rc managed servoces in $SVCDIR so of
course the delta will be all new services. When adding a new longrun,
your contents of $SVCDIR will only be the new service. It's probably
safe since giving s6-svscan SIGALRM only adds services (never
removes), and s6-rc brings down services by directly sending s6-svc
-wD -dx to the service. Not sure if this was a design decision, but I
still prefer having $SVCDIR be representative of my run state. At
least I now know what's going on.


 Yeah, that's not normal. s6-rc-update should remove the links when it
brings the old services down, and should also add the links when it
brings the new services up. I don't have an exact picture of what is
actually happening in all cases; I didn't have the time today, but I'll
do more testing on that tomorrow.

--
 Laurent


Re: s6-rc-update initial findings

2015-09-14 Thread Colin Booth
On Sun, Sep 13, 2015 at 11:25 PM, Colin Booth  wrote:
> Things it didn't do right:
> Put the links back into /run/service
>
> That last one was a bit surprising, and is totally fine until the next
> time I (or something else) issues `s6-svscanctl -an /run/service'. I'm
> going to go manually fix that since an 80% empty supervision root is a
> bit uncomfortable. My guess though is that's undesirable behavior
> since unless I'm mistaken adding longruns require triggering a rescan
> of service/.
>
Ok, did some more testing and it looks like the contents of $SVCDIR
end up being the additive delta between current and new. When
initializing, there are no s6-rc managed servoces in $SVCDIR so of
course the delta will be all new services. When adding a new longrun,
your contents of $SVCDIR will only be the new service. It's probably
safe since giving s6-svscan SIGALRM only adds services (never
removes), and s6-rc brings down services by directly sending s6-svc
-wD -dx to the service. Not sure if this was a design decision, but I
still prefer having $SVCDIR be representative of my run state. At
least I now know what's going on.

Cheers!

-Colin

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