supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Adding a 'setup' phase to service startup?
@ 2005-02-21 17:41 Lars Kellogg-Stedman
  2005-02-22  4:08 ` Dean Hall
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lars Kellogg-Stedman @ 2005-02-21 17:41 UTC (permalink / 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>




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-07 11:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-21 17:41 Adding a 'setup' phase to service startup? Lars Kellogg-Stedman
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

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).