supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Alex Efros <powerman@powerman.asdfGroup.com>
Subject: Re: runit integration
Date: Wed, 31 May 2006 02:40:36 +0300	[thread overview]
Message-ID: <20060530234036.GD5387@home.power> (raw)
In-Reply-To: <J02JGG$CDDA2E0A143EE193321C00E5BEA706C5@scarlet.be>

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.


  parent reply	other threads:[~2006-05-30 23:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-30  7:57 depuis
2006-05-30 14:23 ` Charlie Brady
2006-05-30 23:40 ` Alex Efros [this message]
2006-05-31  5:04   ` Roy Lanek

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=20060530234036.GD5387@home.power \
    --to=powerman@powerman.asdfgroup.com \
    /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).