supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Wayne Marshall <wcm@b0llix.net>
To: Charlie Brady <charlieb-supervision@budge.apana.org.au>
Cc: supervision@list.skarnet.org
Subject: Re: [announce] perp-2.03: persistent process supervision
Date: Mon, 14 Mar 2011 16:35:20 +0100	[thread overview]
Message-ID: <20110314163520.689b7ad3@b0llix.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1103141100590.12563@e-smith.charlieb.ott.istop.com>

On Mon, 14 Mar 2011 11:03:45 -0400 (EDT)
Charlie Brady <charlieb-supervision@budge.apana.org.au> wrote:

> 
> On Mon, 14 Mar 2011, Robin Bowes wrote:
> 
> > On 14/03/11 14:02, Wayne Marshall wrote:
> > 
> > > Under normal (default) configurations, whenever perpd(8)
> > > terminates it is restarted by either perpboot(8), or
> > > init(8) with a "respawn" configuration in inittab(5).
> > > perpd(8) then restarts all services marked for activation
> > > in /etc/perp.
> > 
> > So, if I have a service that is normally running, ie. starts
> > at boot, but I have taken it down manually for whatever
> > reason, and perpd dies, then my service will also be
> > re-started?
> 
> And presumably the converse will apply as well. This is a
> problem with runit (and daemontools) - if a service has a
> 'down' file, but has been later started, a dying runsv (e.g.
> if killed by the OoM killer, or by a service which kills its
> process group) will be replaced by runsvdir, but the service
> will stay down.
> 

This is not so much a "problem" of design, but rather of
adminsistrative clarity.

Use "flag.down" only when you don't want a service to start
immediately with perpd, but do want it activated and available to
perpctl administration.

As an example, I use a wpa_supplicant service definition on my
laptop.  It is defined with "flag.down", because I don't care for
a wireless connection in all circumstances.  Other network
scripts may then call:

  perpctl up wpa_supplicant

or

  perpctl down wpa_supplicant

as necessary.

Otherwise -- and generally for any truly persistent process
service -- administrators will avoid using the "flag.down"
mechanism in favor of the easy, in-place service
activation/deactivation mechanism that perpd provides with the
service directory sticky bit.

Wayne


  reply	other threads:[~2011-03-14 15:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 10:39 Wayne Marshall
2011-03-14 13:17 ` Laurent Bercot
2011-03-14 14:02   ` Wayne Marshall
2011-03-14 14:23     ` Robin Bowes
2011-03-14 14:34       ` Wayne Marshall
2011-03-14 16:47         ` Laurent Bercot
2011-03-14 17:39           ` Wayne Marshall
2011-03-14 17:52             ` Paul Jarc
2011-03-14 18:43               ` Wayne Marshall
2011-03-14 18:34             ` Laurent Bercot
2011-03-14 15:03       ` Charlie Brady
2011-03-14 15:35         ` Wayne Marshall [this message]
2011-03-14 17:02         ` Laurent Bercot
2011-03-14 17:42           ` Charlie Brady

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=20110314163520.689b7ad3@b0llix.net \
    --to=wcm@b0llix.net \
    --cc=charlieb-supervision@budge.apana.org.au \
    --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).