From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1607 Path: news.gmane.org!not-for-mail From: Bernhard Graf Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: using runit as init Date: Thu, 10 Jan 2008 09:39:31 +0100 Message-ID: <200801100939.31805.list-supervision@augensalat.de> References: <200801032151.21524.list-supervision@augensalat.de> <200801100006.54381.list-supervision@augensalat.de> <20080109233504.GW19934@utopia.intra.guy> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199954384 9650 80.91.229.12 (10 Jan 2008 08:39:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2008 08:39:44 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-1842-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Jan 10 09:40:04 2008 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1JCsxE-0004FJ-Ik for gcsg-supervision@gmane.org; Thu, 10 Jan 2008 09:40:00 +0100 Original-Received: (qmail 26094 invoked by uid 76); 10 Jan 2008 08:39:42 -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 26086 invoked from network); 10 Jan 2008 08:39:42 -0000 User-Agent: KMail/1.9.1 In-Reply-To: <20080109233504.GW19934@utopia.intra.guy> Content-Disposition: inline Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1607 Archived-At: KORN Andras wrote: > > I would like to just link init scripts into runsvdir's directory, > > so they are started automatically. But as we know init scripts > > terminate and runsv would restart them immediately. I'd like to > > have a non-respawn mode for runsv. > > So have your script remove the symlink to the directory that contains > it from /service before it exits (or in ./finish). In the sense of self-modifying code? No, thanks! > > Having all this it would be simple to convert the links in > > directories /etc/init.d/rc[0123456S].d into correspondig links > > in /etc/runit/runsvdir/[0123456S] and replace > > init-daemon-install-tools like chkconfig or insserv by > > runit-compliant versions. > > So no need to change all daemons with those init.d start-stop > > scripts. Even those that are installed later would continue to > > work. > > I think this is a misguided attempt to provide "uniformity". > Traditional initscript are quite horrible; I invite you to read, for > example, Ubuntu's apache2 initscript and be appalled at all the > unnecessary complexity and race conditions galore. I'm not advocating init scripts. Compared to daemontools scripts they really suck. As I already wrote several times I'm looking for a way to replace traditional init by something than *can* supervise but also handles the old init scripts correctly. > One of the chief motivations for switching away from an init-like > system, where services daemonise, to a runit-like system where they > are supervised by their parent process is, or at least should be, the > desire to get away from those race conditions and the fragility of it > all. To get away from pid lotto. > > What reason would justify importing that mess into this clean new > service supervision and system startup scheme? I really like the way runit works. I'm a long time user of DJBware and know the concept of daemontools quite well. Maybe I'd be happy with /package too. But I'm a lazy boy, using a widely accepted Linux distribution saves me a lot of time. Therefore I want a drop-in replacement for SysV init. Most people are like me. And that's the reason why most people stick with archaic software like SysV init. Give them an alternative that simply works in their current environment and is better / cleaner / smaller, and more developers / package maintainers would start putting daemontools-like run scripts into their packages, saving you the work of adjusting your setup on every host over and over again. -- Bernhard Graf