public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Roy Marples <uberlord@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] init script guidelines
Date: Tue, 19 Jul 2005 19:00:30 +0100	[thread overview]
Message-ID: <1121796031.10337.6.camel@uberpc.ubernet> (raw)
In-Reply-To: <16CC9569DA3E4D41A1D4BC25D7B5A16A473A7C@hercules.magbank.com>

On Tue, 2005-07-19 at 12:42 -0400, Eric Brown wrote:


> The real problem is not that the daemons don't return errors, but that our init
> scripts do not make reasonable attempts to verify service startup.  If a Gentoo
> init script claims that a service started, it should make an effort to check
> that the processes are actually running shortly after the script is run, even if
> start-stop-daemon says the parent process initialized.  Relying on the return
> value of start-stop-daemon is simply insufficient for some services.

I agree.

Infact, rc-services.sh (/lib/rcscripts/sh) has been totally re-written
for the baselayout-1.12.x branch. It now intercepts calls to
start-stop-daemon and checks if the daemon is still active after a
default time of 0.1 (adjustable) seconds. If not, the we assume the
daemon failed. This solves many existing bugs :)

Also, we kill any rogue processes and other such checks when a stop call
to start-stop-daemon is made - which is handy for when asterisk fails to
start and leaves mpg123 processes lying around :)

Check it out when baselayout-1.12.0pre1 hits portage!

Caveat: - some init scripts abuse start-stop-daemon. One example are all
courier scripts which pass the env program as a daemon. This is easily
worked around, but we fail badly if env then calls a shell script which
in turn launches a daemon. Of all the server stuff I run, only couier
has this issue - but there may be other programs too. Basically
start-stop-daemon should only call daemons!

http://bugs.gentoo.org/show_bug.cgi?id=98745

Roy

-- 
gentoo-dev@gentoo.org mailing list



  parent reply	other threads:[~2005-07-19 18:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19 16:42 [gentoo-dev] init script guidelines Eric Brown
2005-07-19 17:22 ` Chris Gianelloni
2005-07-19 17:45 ` Mike Frysinger
2005-07-19 18:00 ` Roy Marples [this message]
2005-07-19 22:16   ` Francesco R
2005-08-23 14:09   ` Paul de Vrieze
2005-08-31  7:13     ` Roy Marples
2005-08-31  8:05       ` Roy Marples
2005-08-31  8:24         ` Georgi Georgiev
2005-08-31  8:32           ` [gentoo-dev] OT: cvs $Header not substituted Georgi Georgiev
2005-08-31  8:42             ` Brian Harring
2005-08-31  8:54               ` Roy Marples
2005-08-31 10:05                 ` Paul de Vrieze
2005-08-31 10:19                   ` Roy Marples
2005-08-31 13:07                   ` Mike Frysinger
2005-08-31 17:38       ` [gentoo-dev] init script guidelines Roy Marples
2005-07-19 18:14 ` Francesco R
  -- strict thread matches above, loose matches on Subject: below --
2005-07-19 18:08 Eric Brown
2005-07-19 18:40 ` Chris Gianelloni
2005-07-19 20:43   ` Michael Cummings
2005-07-19 21:07     ` Chris Gianelloni
2005-07-19 21:53   ` Martin Schlemmer
2005-07-20  6:30     ` Roy Marples
2005-07-19 20:03 ` Mike Frysinger
2005-07-19 19:39 Eric Brown

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=1121796031.10337.6.camel@uberpc.ubernet \
    --to=uberlord@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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