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@guinix.com>
Subject: service definition vs service activation
Date: 6 Mar 2006 11:13:38 -0800	[thread overview]
Message-ID: <20060306111338.2d8151ff@alloy.copperisle.com> (raw)
In-Reply-To: <20060306160542.18689.qmail@036bc12a5086b2.315fe32.mid.smarden.org>

On Mon, 6 Mar 2006 16:05:27 +0000
Gerrit Pape <pape@smarden.org> wrote:

> ...  The documentation
> now suggest to put service directories by default into the /etc/sv/
> directory, and a list of frequently asked questions with answers
> has been added.

I find it useful to make an explicit distinction between the
directories used for service definition and service activation.

In this nomenclature the service definition directory refers to the
actual physical location of the run scripts, resources, and runtime data
files for a supervised service.  The service activation directory then
refers to a directory scanned by runsvdir (or svscan), into which
services defined in a service definition directory are selectively
symlinked.

The usual custom has been to use /service as the service activation
directory for daemontools services and /var/service as the service
activation directory for runit services.

On the other hand here has been no usual custom or consensus for the
service definition directory.  This is because services combine
attributes of things usually found elsewhere, such
as /etc, /etc/init.d, /var/run, and /var/log.  Service definitions by
their very nature don't exactly fit cleanly anywhere in the usual unix
hier(7) scheme of things.

For the purposes of consistency and making an explicit distinction
between definition and activation, my installations and documentation
are now standardized on the use of /var/service.d as the service
definition directory for all runit services. Then /var/service
continues its role as the primary service activation directory. 

For example:

 # cd /var/service
 # ls -l
 lrwxrwxrwx dropbear -> /var/service.d/dropbear/
 lrwxrwxrwx fnord -> /var/service.d/fnord/
 lrwxrwxrwx mailfront-pop3d -> /var/service.d/mailfront-pop3d/
 lrwxrwxrwx qmail-ofmipd -> /var/service.d/qmail-ofmipd/
 lrwxrwxrwx qmail-send -> /var/service.d/qmail-send/
 lrwxrwxrwx qmail-smtpd -> /var/service.d/qmail-smtpd/
 lrwxrwxrwx twoftpd-anon -> /var/service.d/twoftpd-anon/

Of course all of this is a matter of personal preference and site
policy.  I only mention it here because I believe there is some value
in making the distinction between definition and activation clear.

However I would also say that, no matter the naming conventions one
chooses, there is good reason for keeping service definition
directories on the /var partition.  Maybe this has been hashed to death
elsewhere, but on many systems the /var partition is specifically
suited to hosting log files and dynamic runtime data, while /etc is
usually on the root partition and configured for static data.

As I understand it, the documentation for this release of runit sort of
turns all this on its head.  Now /etc/sv is recommended as the service
definition directory, while /var/service continues as the service
activation directory.

I don't think I would mind too much if /etc/sv were suggested as the
service activation directory.  That would make a certain amount of
sense and I could even grow to like it.  You would then only have the
small problem of suggesting a service definition directory named
something other than /var/service, which on current installations will
be in use as the service activation directory.  Possible choices could
include /var/sv, /var/sv.d, or /var/service.d as mentioned above.

But /etc/sv on too many systems does make a poor choice for the service
definition directory.  Yes, I do know you could symlink /etc/sv back
to yet another directory on the /var partition, or even create a
separate /etc/sv partition with /var-like attributes.  Way too much
bother; it's hard enough to encourage people on the value of service
supervision as it is.

In summary, all this has just been a long-winded way of appealing
for a reconsideration of documenting /etc/sv as the service definition
directory for runit.

Many thanks to Geritt and all who are continuing to support the
development of runit and giving us a viable "way forward" from djb
software.

Wayne



  reply	other threads:[~2006-03-06 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06 16:05 runit-1.4.0 available Gerrit Pape
2006-03-06 19:13 ` Wayne Marshall [this message]
2006-03-06 21:54   ` service definition vs service activation Gilles
2006-03-07  5:21     ` Joshua N Pritikin
2006-03-07 18:35   ` Alex Efros
2006-03-08  5:18     ` Joshua N Pritikin
2006-03-16 10:46     ` Gerrit Pape
2006-03-08 15:40   ` Christian Holtje
2006-03-08 16:04     ` Joshua N Pritikin
2006-03-20 21:17 ` runit-1.4.1 available Gerrit Pape
2006-03-07 13:30 service definition vs service activation Joshua N Pritikin
2006-03-07 17:46 ` Joshua N Pritikin

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=20060306111338.2d8151ff@alloy.copperisle.com \
    --to=wcm@guinix.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).