Re: OpenRC now supports daemon supervision using s6

2015-07-26 Thread Laurent Bercot

On 26/07/2015 04:35, Steve Litt wrote:

For all I know it might amelliorate the other problem: insane init
script complexity, by putting more of the details in the s6 run script.


 I'm not sure that would be a good trade-off. An init script is run once
at boot time - or whenever you're changing the machine state - whereas
a ./run script is run every time the service starts, i.e at least as
often. Better move as much complexity as you can *outside* the run script.



Me, I'd just go with s6 out of the box, but I guess OpenRC is more
corporationally correct or something like that


 What OpenRC does and s6 alone does not is dependency management,
which is important for heavyset services (including, I guess, desktop
setups). A supervision suite does not handle dependencies between
oneshot services and longrun services, and only implicitly handles
dependencies between longrun services (by letting them restart until
everything works). A real dependency-based systems starts services
in the order they are needed, which is all in all a good thing.

 If you want to test a supervision suite + dependency management system
combo doing the right thing, try out anopa, or the publically available
preliminary version of s6-rc. ;)



it can use s6 to do the supervision (and sysvinit to do the PID1, you
can't make this up, folks).


 OpenRC runs s6-svscan as one of its services, so it can't use it as
init - so it needs to run under another init.
 But that's not such a big deal. When switching init systems, the rc
subsystem is really the difficult part. Once you have a working rc
system, it's not too hard to switch pid 1.

--
 Laurent



Re: OpenRC now supports daemon supervision using s6

2015-07-25 Thread Laurent Bercot

On 25/07/2015 21:43, Guillermo wrote:

I was recently looking at OpenRC's source tarball to see how it
implemented something, and was surprised by this little discovery:


 Nice finding! Thanks for the experiments.

--
 Laurent



Re: OpenRC now supports daemon supervision using s6

2015-07-25 Thread Steve Litt
On Sat, 25 Jul 2015 22:07:33 +0200
Laurent Bercot ska-supervis...@skarnet.org wrote:

 On 25/07/2015 21:43, Guillermo wrote:
  I was recently looking at OpenRC's source tarball to see how it
  implemented something, and was surprised by this little discovery:
 
   Nice finding! Thanks for the experiments.
 

I didn't do a lot of reading, but it sounds to me like this solves one
of OpenRC's two disadvantages: The fact that it can't respawn.

For all I know it might amelliorate the other problem: insane init
script complexity, by putting more of the details in the s6 run script.

Me, I'd just go with s6 out of the box, but I guess OpenRC is more
corporationally correct or something like that, and as such, I'm glad
it can use s6 to do the supervision (and sysvinit to do the PID1, you
can't make this up, folks).

SteveT

Steve Litt 
July 2015 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21