From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1297 Path: news.gmane.org!not-for-mail From: Vincent Danen Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Option for runsv/runsvdir to specify how many times to restart a service in a certain time period before giving up? Date: Mon, 30 Oct 2006 11:49:47 -0700 Organization: Annvix Message-ID: <20061030184947.GO721@annvix.org> References: <4543AEE3.50200@alex-smith.me.uk> <20061030104923.GC32166@home.power> <20061030121321.GA27602@fly.srk.fer.hr> <20061030123019.GA30814@home.power> <20061030133847.GA25085@skarnet.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GPOl6LAGMgeiWDic" X-Trace: sea.gmane.org 1162234767 19982 80.91.229.2 (30 Oct 2006 18:59:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2006 18:59:27 +0000 (UTC) Original-X-From: supervision-return-1533-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Oct 30 19:59:20 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1GecCl-0000ha-Ul for gcsg-supervision@gmane.org; Mon, 30 Oct 2006 19:49:52 +0100 Original-Received: (qmail 9499 invoked by uid 76); 30 Oct 2006 18:50:13 -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 9493 invoked from network); 30 Oct 2006 18:50:12 -0000 Original-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20061030133847.GA25085@skarnet.org> X-Mailer: Mutt 1.5.x/OS X 10.4.x X-PGP-Key: http://linsec.ca/vdanen.asc X-URL: http://annvix.org/ User-Agent: Mutt/1.5.10i X-SA-Exim-Connect-IP: 68.149.51.213 X-SA-Exim-Mail-From: vdanen@annvix.org X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on hades.annvix.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-SA-Exim-Version: 4.2 (built Wed, 01 Feb 2006 18:29:36 -0700) X-SA-Exim-Scanned: Yes (on hades.annvix.org) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1297 Archived-At: --GPOl6LAGMgeiWDic Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Laurent Bercot [2006-10-30 14:38:47 +0100]: > I also tend to think this feature goes outside the scope of "basic" > supervision tools as runit and daemontools. Sure, it could be integrated > in such tools, and not even make them too bloated; nevertheless, I like > the simple guarantees that they offer, and would prefer not to alter > their semantics too much. >=20 > The feature can rather easily be implemented on a higher layer. You > could write a program that checks the restarting rate (provided runit > notifies some place when it restarts the service - I really need to > finish that notify library of mine :/ - is a program currently able > to listen to such an event without polling anything ?) and touches the > "down" file when the restart rate is too high. This is something we implemented in the srv wrapper program for Annvix: http://svn.annvix.org/cgi-bin/viewvc.cgi/srv/trunk/?root=3Dtools What it does is before it "releases" a service, is it checks to see if it's looping and if it is, marks it down. Of course, the problem here is at boot... since srv isn't starting services (srv is a tool like sv or the "service" command with initscripts), it won't help so there is some validity to wanting this at the runit layer... ie. we can check for looping all we want in srv, but when runsvdir is fired up in stage 2, unless you put these checks in every finish script and/or run script, it won't help at all. Anyways, does runsv run the finish script if run exits on it's own? I was under the impression that finish was called by sv when you mark a service down (ie. if i was running apache supervised and i sent it a kill -9 (without using sv), would runsv actually execute the finish script or see that run died and just restart run? --=20 {FEE30AD4 : 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4} mysql> SELECT * FROM users WHERE clue > 0; Empty set (0.00sec) --GPOl6LAGMgeiWDic Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFRklKLrxeMv7jCtQRAvBkAKCsjfFnQXjALLlnC7RE3Q+tEtheCwCdEjzF vG0Uje+Qs+ILvS7nfxjD2Z8= =wwsM -----END PGP SIGNATURE----- --GPOl6LAGMgeiWDic--