supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Dražen Kačar" <dave@fly.srk.fer.hr>
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 19:49:23 +0100	[thread overview]
Message-ID: <20061030184923.GA20787@fly.srk.fer.hr> (raw)
In-Reply-To: <20061030123019.GA30814@home.power>

Alex Efros wrote:
> On Mon, Oct 30, 2006 at 01:13:21PM +0100, Dra?en Ka?ar wrote:
> > Sure, but if something's a common need for a large group of users, then
> > they call it a feature. Some of those who don't need such feature call it
> > a bloat, but I don't think that's a valid argument.
> 
> No. Bloat isn't equal to 'new feature'. Bloated software isn't equal to
> feature-rich software. But if software has wrong features added in wrong
> places (from architecture view) then it's become bloated very quickly.

Yes, but that doesn't depend on features at all, although the wrong
architectural decisions usually happen because someone was trying to add
just one more feature.

> Maybe it's good idea to include additional script in runit package (or
> distribute it separately) which can be used from ./finish script this way:
> 
>     # add 5 minutes timeout if service was started 5 times in last 10 sec
>     restart-timeout --interval 10 --tries 5 300

Maybe. However, then you end up with sed or perl as your configuration tool.
Suppose you have 10 or 20 such scripts and you want to change the interval
number. And that somebody else wrote finish scripts, by using whichever
tools he had.

> But adding this functionality to runit is a bad idea just because you
> already can develop that restart-timeout script using current runit,
> and adding this feature to runit doesn't provide any additional gains.

It does. Ease of configuration, for example. If an administrator has to
configure programs with shell scripts, another admin has to find, read and
understand those scripts before he can change anything. That's an overhead
I'd like to avoid for simple things.

Suppose the problem was fixed, but runit is waiting for the finish scripts
to exit. How does one tell them to exit immediately and let runsv restart
the services?

This problem doesn't exist if the restart period is one second because the
service will be restarted faster than you can type the command. But if the
waiting period can be longer, then there should be a way to manually
terminate the waiting prematurely.

I'm not saying that the ability to write a script is wrong. In this
particular example it would be good to have that option if one wants to
have exponential back-off or some other, more complex timing calculation.

> After all, it's a Unix Way.

It's a way of the people who like to write shell scripts.

-- 
 .-.   .-.    Yes, I am an agent of Satan, but my duties are largely
(_  \ /  _)   ceremonial.
     |
     |        dave@fly.srk.fer.hr


  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
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 [this message]
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=20061030184923.GA20787@fly.srk.fer.hr \
    --to=dave@fly.srk.fer.hr \
    /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).