From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1602 Path: news.gmane.org!not-for-mail From: Vincent Danen Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: using runit as init Date: Tue, 08 Jan 2008 19:05:03 -0700 Message-ID: <20080109020503.GX41886@linsec.ca> References: <200801032151.21524.list-supervision@augensalat.de> <200801060017.52406.list-supervision@augensalat.de> <20080108071144.GJ41886@linsec.ca> <200801082328.06568.list-supervision@augensalat.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DCA/C9WSnDtl50zu" X-Trace: ger.gmane.org 1199844341 8777 80.91.229.12 (9 Jan 2008 02:05:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Jan 2008 02:05:41 +0000 (UTC) Cc: supervision@list.skarnet.org To: Bernhard Graf Original-X-From: supervision-return-1837-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Jan 09 03:05:56 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 1JCQK3-000608-SH for gcsg-supervision@gmane.org; Wed, 09 Jan 2008 03:05:49 +0100 Original-Received: (qmail 14282 invoked by uid 76); 9 Jan 2008 02:05:22 -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 14261 invoked from network); 9 Jan 2008 02:05:22 -0000 X-URL: http://linsec.ca/ In-reply-to: <200801082328.06568.list-supervision@augensalat.de> Content-disposition: inline X-PGP-Key: http://linsec.ca/vdanen.asc X-PGP-Key-ID: 0xFEE30AD4 X-PGP-Key-Fingerprint: 7F6C A60C 06C2 4811 FA1C A2BC 2EBC 5E32 FEE3 0AD4 X-Delivery-Agent: TMDA/1.1.10 (Killyloch) X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: vdanen@linsec.ca X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on hades.annvix.ca X-SA-Exim-Version: 4.2.1 (built Tue, 18 Dec 2007 12:19:09 -0700) X-SA-Exim-Scanned: Yes (on hades.annvix.org) User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=unavailable version=3.2.3 X-Spam-Level: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1602 Archived-At: --DCA/C9WSnDtl50zu Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bernhard Graf [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=20 >suppose). Brought me to execline among other things, which I knew for=20 >quite some time, but never actually used so far. Yeah, Annvix is a lot of work. =3D) 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=20 >replace "standard" (Linux/SysV) init while keeping the start/Stop=20 >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=20 >don't have a svscan-like function, they can start dependend services at=20 >start-up - later services must be brought up and down by [mn]svc=20 >command. Potentially this would fit better into an existing SysV-based >init scheme, because "/etc/init.d/service start" would just execute=20 >[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=20 >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. --=20 Vincent Danen @ http://linsec.ca/ --DCA/C9WSnDtl50zu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkeEK88ACgkQLrxeMv7jCtTUMACgwcpsSXBvTGz7rg4cKtXAykPa JEYAnj1n+E9vMdbn4WV3IAcnRjV0dfNr =b3Kc -----END PGP SIGNATURE----- --DCA/C9WSnDtl50zu--