From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1984 Path: news.gmane.org!not-for-mail From: David Miller Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Configuration services Date: Tue, 28 Jul 2009 11:01:24 -0500 Message-ID: <20090728160124.GA26765@pretender.frop.net> References: <20090726162204.GA19230@pretender.frop.net> <20090727085635.GO30106@fencepost.gnu.org> <20090728020821.GA25002@pretender.frop.net> <20090728055251.GA29760@skarnet.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248796902 12303 80.91.229.12 (28 Jul 2009 16:01:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2009 16:01:42 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2219-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Jul 28 18:01:34 2009 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1MVp7I-0006fV-HE for gcsg-supervision@gmane.org; Tue, 28 Jul 2009 18:01:28 +0200 Original-Received: (qmail 23686 invoked by uid 76); 28 Jul 2009 16:02:45 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 23676 invoked from network); 28 Jul 2009 16:02:44 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=frop.net; b=fjCsApHm8SLk+EiW5DLoAMH1+gVoXxh649J+PvBGUc7h0UNdMoXply+Kjl1W3hSWdpjPnO/TIc9TOsqeHLW7sESW1VDw1WYHTGNamdgtVAeG6kOkWxDq1WcqFPvRjPkA372+MEP57Q+wLNoZUEsPVGyUCwt+VyPF4qPiyQKwmHg= ; Content-Disposition: inline In-Reply-To: <20090728055251.GA29760@skarnet.org> User-Agent: Mutt/1.4.2.3i Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1984 Archived-At: 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/