From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/390 Path: main.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit/dependencies Date: Sat, 8 May 2004 17:22:00 +0000 Message-ID: <20040508172042.28717.qmail@61a594ec87927e.315fe32.mid.smarden.org> References: <20040112142913.14952.qmail@ccf32c333c9930.315fe32.mid.smarden.org> <20040118154414.1751.qmail@6a8fbebe6bb2f4.315fe32.mid.smarden.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084036831 20752 80.91.224.253 (8 May 2004 17:20:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 17:20:31 +0000 (UTC) Original-X-From: supervision-return-628-gcsg-supervision=m.gmane.org@list.skarnet.org Sat May 08 19:20:24 2004 Return-path: Original-Received: from 212-85-147-14.unassigned.custom1.lost-oasis.net ([212.85.147.14] helo=antah.skarnet.org) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1BMVUu-00035x-00 for ; Sat, 08 May 2004 19:20:24 +0200 Original-Received: (qmail 8995 invoked by uid 76); 8 May 2004 17:20: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 8990 invoked from network); 8 May 2004 17:20:45 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: main.gmane.org gmane.comp.sysutils.supervision.general:390 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:390 On Thu, May 06, 2004 at 07:53:31PM -0700, Kevin P. Fleming wrote: > I've been exploring the daemontools/runit/simpleinit/minit world, and I > want dependency handling too. However, I want something that I've not I'm still curious about an example. What's the problem that dependency handling should solve? What's wrong with?: http://smarden.org/runit/dependencies.html > come across yet, but seems terribly logical to me: if runsv is managing > a service, and that service dies, and then dies again when runsv tries > to start it (say, 3 times), then runsv should stop trying to start it As Alex Efros said, you can do this through the ./finish script. E.g.: If ./finish is started the first time, save the time; if started again within 5 seconds, sleep 2 seconds; if started again within 5 seconds, sleep 4 seconds; if started again within 5 seconds, run `runsvctrl down .`. Do you have an example where such a behavior does any good? > _AND_ anything that's dependent on it should be told to shutdown. You could use symlinks to save dependency informations: link the service directories of the dependent services into ./dependents/ and run `runsvctrl term ./dependents/*`, or `runsvctrl down ./dependents/*`, in ./finish. Regards, Gerrit.