On Tue, 15 May 2018 23:39:24 +1000
Tom <wirelessd...@gmail.com> wrote:

> > On 14 May 2018, at 18:51, Steve Litt <sl...@troubleshooters.com>
> > wrote:
> > 

> > Way 2 is to have OpenRC run either runit or s6 from /etc/inittab
> > with "respawn", and then to put all respawnable daemons in runit or
> > s6. Running either runit or s6 *as a supervisor rather than an
> > init* is dead-bang easy. Since about 2010 I've been doing something
> > similar: I ran daemontools on top of sysvinit, and it always worked
> > out great for me.
> > 
> > SteveT  
> 
> Thanks as always for your insightful information Steve.  Much
> appreciated.  As someone who knows very little about init systems,
> can you explain what this respawning business is all about?  

Terminology: I call the init system we've used for 30 years "sysvinit".

Yes, I'll explain. Your httpd server crashes. There are two ways of
handling it:

1) Let it stay crashed until human intervention restarts it.
2) Make it restart itself (this is called respawning)

Neither is better than the other: Which one to use depends on the
situation. With something like httpd, perhaps it's best for a human to
fix and diagnose it so it doesn't keep happening. However, some of my
home-grown daemons are buggy enough that I'd rather they just log the
crash and restart.

* Sysvinit mainly stays crashed, but daemons identified as "respawn"
  in /etc/inittab respawn themselves.

* OpenRC, by itself, only stays crashed.

* SystemD does either.

* Runit and s6 only respawn unless extraordinary measures are taken

* s6 plus s6-rc does either

* Bolting on either runit or s6 on top of either sysvinit or 

> I didn’t
> realise the existing sysv-rc 

I assume here you mean sysvinit when you write sysv-rc.

> did anything like that as I’ve never had
> one of the regular system daemons (or apache2, ntp, etc.) knowingly
> crash on me.

In which case, you probably have little need for respawning.

> 
> Apart from being a drop-in replacement for sysv-rc, is there any
> noticeable feature that I would use as a sysadmin with OpenRC?  

I'm not an OpenRC expert, so everything I know is second hand. I've
heard OpenRC can do parallel instantiation, for faster boots. You know,
like systemd claims to do. People more knowledgeable than I can give
you other OpenRC advantages.

> I’ve
> never encountered any boot issues or problems starting/stopping
> services with says-rc.  

You sound like the ideal candidate for either sysvinit or OpenRC.

> Perhaps there are other features of init
> systems that people use regularly?

YES! I use the following two features of runit regularly:

1) Simplicity
2) Run scripts are <10 lines, not the 30Megaline behemoths of sysvinit
   and OpenRC.
3) Daemons run by runit (or s6 or any other daemontools-inspired init
   or process supervisor) needn't (and shouldn't) background itself.
   Makes it much easier to write your own daemons.

SteveT

Steve Litt 
June 2018 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28


_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to