supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Lars Kellogg-Stedman <lars@oddbit.com>
Subject: Adding a 'setup' phase to service startup?
Date: Mon, 21 Feb 2005 17:41:59 +0000 (UTC)	[thread overview]
Message-ID: <slrnd1k7hn.j93.lars@flowers.house.oddbit.com> (raw)

I was mulling over service dependencies yesterday, and I wonder if it would
make sense to add a "setup" phase to runsv's service startup sequence.
This would allow, for example, svwaitup to block while a service performed
one time initialization.

Here I'm thinking particularly of long-running setup actions, such as
database initialization or something.  The current solution -- waiting for
a number of seconds and then crossing our fingers -- doesn't provide the
level of control that runit provides in other areas.

This would make the start sequence look like this:

  IF file "setup" exists THEN
    SET STATE TO S_SETUP
    RUN file "setup"
  END IF

  SET STATE TO S_RUN
  RUN file "run"

  IF file "finish" exists THEN
    SET STATE TO S_FINISH
    RUN file "finish"
  END IF

svwaitup() would block if a service was in the "setup" phase.  This should
require only minor changes to runit -- introduce "runsv" to the "setup"
script, and modify svwaitup, svwaitdown, and runsvstat to understand a new
state value in the status file.

-- Lars

-- 
Lars Kellogg-Stedman <lars@oddbit.com>




             reply	other threads:[~2005-02-21 17:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 17:41 Lars Kellogg-Stedman [this message]
2005-02-22  4:08 ` Dean Hall
2005-02-22 15:06   ` Thomas Schwinge
2005-02-23 20:07   ` Lars Kellogg-Stedman
2005-02-24  4:28     ` Dean Hall
2005-02-24  4:40     ` Dean Hall
2005-02-23 21:12 ` Stefan Karrmann
2005-03-07 11:56 ` Gerrit Pape

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=slrnd1k7hn.j93.lars@flowers.house.oddbit.com \
    --to=lars@oddbit.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).