supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* right way to shutdown services
@ 2006-02-13 17:06 Alex Efros
  0 siblings, 0 replies; only message in thread
From: Alex Efros @ 2006-02-13 17:06 UTC (permalink / raw)


Hi!

I notice Pape recommend this to shutdown services:

    sv -w196 force-stop /var/service/*	    # TERM, pause, KILL
    sv exit /var/service/*		    # TERM, TERM to log, exit runsv

but it's unclear for me is it better than this:

    killall -HUP runsvdir
    killall -TERM runsv			    # TERM, TERM to log, exit runsv
    svwaitdown -t7 /var/service/*	    # pause
    # ... and some time later:
    killall5 -9				    # KILL

Pape's way may be better from this view: if ./run don't exit after TERM,
then it will be KILL'ed and __then__ TERM will be sent to ./log/run.
In my way ./log/run will be KILL'ed together with ./run and will've no
chance to exit gracefully on TERM. But... is it important, especially in
case we anyway forced to KILL ./run?

My way has another feature: it will try to gracefully shutdown
runsvdir/runsv processes which other, non-root users may run. There no
way to know which directory these users supervise with runsvdir, so I
unable to run 'sv exit /path/to/their/dir', but I still can HUP _all_
runsvdir and TERM (exit) _all_ runsv - this give their services chance
to exit gracefully on system shutdown.

To have both features probably enough to add '-k' option to my svwaitdown..?

-- 
			WBR, Alex.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-13 17:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 17:06 right way to shutdown services Alex Efros

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