From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1296 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= 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 19:49:23 +0100 Message-ID: <20061030184923.GA20787@fly.srk.fer.hr> References: <4543AEE3.50200@alex-smith.me.uk> <20061030104923.GC32166@home.power> <20061030121321.GA27602@fly.srk.fer.hr> <20061030123019.GA30814@home.power> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1162234740 19859 80.91.229.2 (30 Oct 2006 18:59:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Oct 2006 18:59:00 +0000 (UTC) Original-X-From: supervision-return-1532-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Oct 30 19:58:54 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-0000bh-PE for gcsg-supervision@gmane.org; Mon, 30 Oct 2006 19:49:26 +0100 Original-Received: (qmail 9335 invoked by uid 76); 30 Oct 2006 18:49:47 -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 9329 invoked from network); 30 Oct 2006 18:49:47 -0000 Original-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20061030123019.GA30814@home.power> X-Face: 'UIE}WabGB0+U>p-#(hp<_+AD2{H],=qR*jHfm$/e]l0(kU3oOYc5lqG6gg>[\h^IOc{'siD6#!T&loIShgmYHz3#+*D38:|`~\BE,(W~Ol9BDfDwk'lKJ;Z{sY8E9(ME.E]'wvNO`$n#,;9Z`tOFcW/nHZq!BOSrM>V?C<5DTw=<${c{M2V+|)0jSUl&!+8%8nIBF(u:E>SZWM^e User-Agent: Mutt/1.4i X-Attribution: Dave X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (fly.srk.fer.hr [127.0.0.1]); Mon, 30 Oct 2006 19:49:23 +0100 (MET) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1296 Archived-At: 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