[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Process spervision with Monit support in init systems (was: Upstart support for LSB headers (Two line init.d scripts? Sure, that will work!))



On 02/07/2014 03:58 AM, Tollef Fog Heen wrote:
> ]] Sergey B Kirpichev 
> 
>> Are you trying to sell me yet another init or do you suggest some
>> alternative solution *with* Debian's sysvinit, not using
>> "Should-Start/Stop: $all"?  If the first, please stop.  If
>> the second - please go ahead.
> 
> No.
> 
> I'm pointing out why $all doesn't do what you want.  «$all» means «after
> everything else has started» and if you have two of those, you have a
> loop.  Loops are bugs.
> 
> In your particular case (and sysvinit), I'd say the admin should just
> add dependencies on the monit script for the monitored services since I
> don't think sysvinit support dynamically generating those dependencies
> on boot. (If it does, I'm sure somebody will chime in with how to do it
> for sysvinit.)
> 
> With systemd, I'd say a generator that adds After+Wants:
> $monitored_services would be the right (and better) solution (this would
> also solve the shutdown problem).  I assume upstart has a reasonable way
> to solve this, but I'm not familiar with what it should be.

The only viable solution is to integrate monit support inside the init
system, like what's currently happening in OpenRC:

http://qnikst.github.io/posts/2013-11-06-openrc-supervision.html

with patch available here:

https://github.com/qnikst/openrc/compare/s-vision

Note that it is on my todo list to evaluate this patch, but I didn't
have the time to do that work yet. Any contribution would be welcome
from anyone willing to test it, and see if it integrates well with the
current OpenRC package.

Note that this has verry little to do with *process* supervision, like
it would be done with s6 (http://skarnet.org/software/s6/) which is also
on the OpenRC upstream todo list.

Cheers,

Thomas Goirand (zigo)


Reply to: