supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Vincent Danen <vdanen@linsec.ca>
To: Bernhard Graf <list-supervision@augensalat.de>
Cc: supervision@list.skarnet.org
Subject: Re: using runit as init
Date: Tue, 08 Jan 2008 19:05:03 -0700	[thread overview]
Message-ID: <20080109020503.GX41886@linsec.ca> (raw)
In-Reply-To: <200801082328.06568.list-supervision@augensalat.de>

[-- Attachment #1: Type: text/plain, Size: 3407 bytes --]

* Bernhard Graf <list-supervision@augensalat.de> [2008-01-08 23:28:06 +0100]:

>Vincent Danen wrote:
>
>> You may also be interested in what Annvix has done.  Annvix has used
>> runit for init for quite a few years now, and very successfully.  It
>> still handles traditional "initscripts", but doesn't handle
>> number-based runlevels or runlevel switching (largely due to the fact
>> that Annvix has no GUI and thus has no real need for that).
>
>Of course I also discovered Annvix already. Nice work (and a lot of, I 
>suppose). Brought me to execline among other things, which I knew for 
>quite some time, but never actually used so far.

Yeah, Annvix is a lot of work.  =)  And thank you.  Execline is
definitely nice..  using it with dietlibc for some stuff (like mingetty
and runit itself) really keeps the overhead down.

>> That's got the relevant runit scripts we use to handle init.  Note
>> that we don't completely do away with sysvinit... there are some
>> useful tools that come with it; we just don't use sysvinit's init.
>
>Actually I'm missing two essential things in runit, that would allow to 
>replace "standard" (Linux/SysV) init while keeping the start/Stop 
>scripts in the beginning:
>
>- possibility to set no-respawn mode for a service, instead run command
>  (e.g. "/etc/init.d/service start") when service appears in runsvdir's
>  directory and run other command (e.g. "/etc/init.d/service stop) when
>  it disappears

Wasn't this addressed already?  Or maybe I'm missing something?  Can't
you use the down script?  I.e. you could use run to start it and once it
exits, doesn't runit look for the down script to execute prior to
restarting?  If so, you could use a 'sv down' or something similar (maybe
even something as simple as touching 'down') to prevent it from starting
again, right?

Of course, if you do something like that, you might need to write a
wrapper that would remove the down file before calling 'svc up'.

>- service dependencies

We've tackled this somewhat, but Annvix has a frontend called srv which
handles the dependencies.  It's quite crude and definitely could use
some work, but we've found there are very few things outside of nfs that
have strict "service X needs to be up and running before service Y"
dependencies.

>Another interesting project is ninit [1] and its ancestor minit [2]
>
>[1] http://riemann.fmi.uni-sofia.bg/ninit/
>[2] http://www.fefe.de/minit/
>
>Those have dependencies and can start services w/o respawn, but they 
>don't have a svscan-like function, they can start dependend services at 
>start-up - later services must be brought up and down by [mn]svc 
>command. Potentially this would fit better into an existing SysV-based
>init scheme, because "/etc/init.d/service start" would just execute 
>[mn]svc -u service and "/etc/init.d/service stop" [mn]svc -d service.

Never looked at these.  svscan is definitely useful.  Do they supervise
services as well?

>Still runit is much more elegant IMHO by starting and removing services 
>as they appear and disappear - this would make runlevels really easy.

For me, I'm satisfied with runit -- it does the job and it does it
extremely well.  We've been using it as the defacto init system on
Annvix for quite a few years and I can't see that changing anytime soon.

-- 
Vincent Danen @ http://linsec.ca/

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2008-01-09  2:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 20:51 Bernhard Graf
2008-01-04  0:22 ` Mike Buland
2008-01-05  0:06   ` Bernhard Graf
     [not found]   ` <12EC84FDD73F4BD8A78E7501EB19F1E2@home.internal>
2008-01-05  7:45     ` rehan khan
2008-01-05 23:17       ` Bernhard Graf
2008-01-08  7:11         ` Vincent Danen
2008-01-08 22:28           ` Bernhard Graf
2008-01-09  2:05             ` Vincent Danen [this message]
2008-01-09 23:06               ` Bernhard Graf
2008-01-09 23:34                 ` Mike Buland
2008-01-09 23:51                   ` Charlie Brady
2008-01-10  9:22                     ` Bernhard Graf
2008-01-10  9:20                   ` Bernhard Graf
2008-01-10 20:06                     ` Mike Buland
2008-01-11  7:58                       ` Bernhard Graf
2008-01-11 14:30                         ` Mike Buland
2008-01-12 10:18                           ` Bernhard Graf
2008-01-12 17:13                             ` supervising (Re: using runit as init) Charlie Brady
2008-01-12 17:32                               ` supervising mysql (Re: supervising (Re: using runit as init)) Charlie Brady
2008-01-13  4:40                             ` using runit as init Vincent Danen
2008-01-13 15:36                               ` Charlie Brady
2008-01-13 18:28                                 ` Mike Buland
2008-01-13 18:39                                   ` Charlie Brady
2008-01-13 18:49                                     ` Mike Buland
2008-01-14  3:55                                       ` Vincent Danen
2008-01-14 15:11                                         ` Charlie Brady
2008-01-14 15:21                                           ` Vincent Danen
     [not found]                                     ` <6A64B0D384404190ACB76E0A376CD148@home.internal>
2008-01-13 21:06                                       ` rehan khan
2008-01-14  3:53                                 ` Vincent Danen
     [not found]                             ` <CDFFB8AF013F4762AE02CF6A1BDCB27A@home.internal>
2008-01-13 10:35                               ` rehan khan
2008-01-14  3:50                                 ` Vincent Danen
2008-01-13 18:52                             ` Mike Buland
     [not found]                     ` <85040AD9CA634253A8FDB9F7DA6BD200@home.internal>
2008-01-10 22:08                       ` rehan khan
2008-01-11  1:28                         ` Charlie Brady
     [not found]                   ` <C1A5323F485E4A75B75ADB58B664E35E@home.internal>
2008-01-10 21:56                     ` rehan khan
2008-01-09 23:35                 ` KORN Andras
2008-01-10  8:39                   ` Bernhard Graf

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=20080109020503.GX41886@linsec.ca \
    --to=vdanen@linsec.ca \
    --cc=list-supervision@augensalat.de \
    --cc=supervision@list.skarnet.org \
    /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).