supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: David Miller <dave@frop.net>
To: supervision@list.skarnet.org
Subject: Re: Configuration services
Date: Tue, 28 Jul 2009 11:01:24 -0500	[thread overview]
Message-ID: <20090728160124.GA26765@pretender.frop.net> (raw)
In-Reply-To: <20090728055251.GA29760@skarnet.org>

Laurent spoke thusly:
> > I want to be able to have other services depend on it.
> > (cut)
> > I also have a ./finish script that undoes all the configuration
> 
>  ... and if a stray signal happens to kill your shell, your "service"
> will be deconfigured and reconfigured.
>  The supervisor is there to ensure a process remains up no matter what;
> it's suppoed to maintain a *process*, not a *state*. The only state it
> can guarantee is 'want up', i.e. if the process ever goes down, you can
> be sure it will be run again.
> 
>  You are not the first to want to use the daemontools/runit pattern as
> a dependency manager, implementing a wider notion of 'service' than it
> really does. As far as I can tell, this is not a very good idea - it
> can be made to work, but it's generally shaky and unsatisfying. As a
> rule of thumb, whenever you have a loop in your run script, you are
> probably abusing the pattern.

Thanks for the good post.  It does seem like I am fitting a square peg in a round hole, so I wanted to make sure that I was not missing something.  And apparently I am not.  A few pages on Gerrit's site made me think that runit could be used in this way.  Quoting Gerrit from http://smarden.org/pape/djb/daemontools/noinit.html :

"Having the above design in mind, why not think about eth0 as a service? Let a supervisor garantee the state of eth0, take it like any other service."

I wonder if Gerrit can clarify what he meant by that.

runit already has some notion of states as opposed to processes,  it can use a ./check script to decide whether a service is "ready". I guess my point is that runit is very close to being able to be used in this manner but as you say it is a bit akward.

I am considering writing a shell script I can call from dependent services instead of using 'sv check'. But I am not sure if my while loop is sufficiently abominable to necessitate the effort. 

Thanks for the input everyone!
-- 
David Miller dave@frop.net http://dave.frop.net/


      reply	other threads:[~2009-07-28 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-26 16:22 David Miller
2009-07-26 17:07 ` Laurent Bercot
2009-07-26 18:45   ` Charlie Brady
2009-07-26 21:10     ` David Miller
2009-07-27  8:56 ` Thomas Schwinge
2009-07-28  2:08   ` David Miller
2009-07-28  5:52     ` Laurent Bercot
2009-07-28 16:01       ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090728160124.GA26765@pretender.frop.net \
    --to=dave@frop.net \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).