From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1138 Path: news.gmane.org!not-for-mail From: Alex Efros Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit integration Date: Wed, 31 May 2006 02:40:36 +0300 Organization: asdfGroup Inc., http://powerman.asdfGroup.com/ Message-ID: <20060530234036.GD5387@home.power> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1149032444 6193 80.91.229.2 (30 May 2006 23:40:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 May 2006 23:40:44 +0000 (UTC) Original-X-From: supervision-return-1374-gcsg-supervision=m.gmane.org@list.skarnet.org Wed May 31 01:40:41 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 1FlDpG-0000UY-Qy for gcsg-supervision@gmane.org; Wed, 31 May 2006 01:40:38 +0200 Original-Received: (qmail 7546 invoked by uid 76); 30 May 2006 23:40:59 -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 7540 invoked from network); 30 May 2006 23:40:59 -0000 Original-To: supervision@list.skarnet.org, depuis Mail-Followup-To: supervision@list.skarnet.org, depuis Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1138 Archived-At: Hi! On Tue, May 30, 2006 at 09:57:52AM +0200, depuis wrote: > My background: linux hacker since 1996 (Slackware 3), today using debian etch Hehe... I think most people in this list have similar background. :) Before trying to find "better solution" like daemontools&runit you should become unsatisfied with existing mainstream solutions (sysvinit, start-stop-daemon, scripts in /etc/init.d/, etc.) and this require some years. > I think that runit should provide some compatibility mechanism with the > existing rc runlevels and /etc/init.d/ scripts. Maintainers carefully polished > those scripts, some are very elaborate, and providing a drop-in for these > scripts is a lot of work: compatibility issues, following the latest version, > and so on. I don't think it's possible and good idea. Main reason to use daemontools/runit - get as secure and as reliable solution as possible. It's nearly impossible to write complex software which will be secure and reliable... and because of this daemontools and runit prefer most simplest and straight solutions. Your idea will add additional level of complexity and thus result in less security and realiability. Also I must say what I disagree with you about quality and goodness of /etc/init.d/* scripts "carefully polished by maintainers". I worked with these scripts in Red Hat (versions 6 - 7.3) and Gentoo (1.4 - current)... and I must say what these scripts contains huge amount of complex, junk code which slowdown them and contain a lot of bugs. I'm supporting my own alternative to these scripts in last 5 years. My system boot using single bash script with ~40 lines. Services started using tiny ./run files used by daemontools and runit. (Only /etc/init.d/ script which I use is "vmware" - it's too complex to analyze it and rewrite as ./run... and support it for each new vmware release.) This small "boot script" isn't designed to be flexible and compatible with everything - it's designed to be simple and do everything needed to boot my system. But... in these years I found this script enough to boot all my servers and my friend's home systems too - only few lines require individual tuning per each system: 1) hostname 2) modprobe 3) ifconfig/route 4) loadkeys/setfont Also this small script is really perfect for learning "how linux boot". :) Few weeks ago I rewrote this script to add some features: 1) faster boot in initng style (execute some commands in parallel) (my script was really fast and before this because it much shorter than usual /etc/init.d/ scripts, but now it's few seconds faster :)) 2) show detailed information in case of any errors happens 3) ask "press any key in 5 seconds to open shell" if any errors happens while boot or shutdown (to allow manual fixing of these errors before continuing booting) 4) log everything printed to screen while boot/shutdown into log files - to help detecting errors on remote servers 5) support runlevels using kernel params With all these features script size increased from 40 lines to 200 plus it now use small library with bash functions (80 lines more). But it's still much smaller and simpler than usual boot scripts used in all distributions. (Probably it become smaller in near future because I'll remove 'parallel booting' feature - few seconds faster booting doesn't important enough to add this layer of complexity.) To support my script I carefully review every changes in Gentoo /etc/init.d/ scripts when new version of sys-apps/baselayout package released. ...In 99% cases they fix their own errors(!) - it's very rare case when I notice some changes which I should duplicate in my script too - probably once per year or so! -- WBR, Alex.