supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Vincent Danen <vdanen@linsec.ca>
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	[thread overview]
Message-ID: <20061030184947.GO721@annvix.org> (raw)
In-Reply-To: <20061030133847.GA25085@skarnet.org>

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

* Laurent Bercot <ska-supervision@skarnet.org> [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.
> 
>  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=tools

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?

-- 
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
mysql> SELECT * FROM users WHERE clue > 0;
Empty set (0.00sec)

[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]

  parent reply	other threads:[~2006-10-30 18:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-28 19:26 Alex Smith
2006-10-30 10:49 ` Alex Efros
2006-10-30 10:50   ` Alex Efros
2006-10-30 12:13   ` Dražen Kačar
2006-10-30 12:30     ` Alex Efros
2006-10-30 13:38       ` Laurent Bercot
2006-10-30 13:42         ` Alex Efros
2006-10-30 13:58           ` Laurent Bercot
2006-10-30 14:24             ` Alex Efros
2006-10-30 14:51             ` Charlie Brady
2006-10-31  0:48               ` Laurent Bercot
2006-10-30 18:49         ` Vincent Danen [this message]
2006-10-30 21:28           ` Alex Efros
2006-10-30 21:30             ` Vincent Danen
2006-10-30 17:52       ` Alex Smith
2006-10-30 21:41         ` Alex Efros
2006-11-01 12:01           ` Gerrit Pape
2006-11-01 12:17             ` Alex Efros
2006-10-30 18:49       ` Dražen Kačar
2006-10-30 22:03         ` Alex Efros

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=20061030184947.GO721@annvix.org \
    --to=vdanen@linsec.ca \
    /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).