supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: Linux startup issue
       [not found] <Pine.LNX.4.61.0408121801310.23255@avion.km3t.org>
@ 2004-08-13  9:41 ` Jonathan de Boyne Pollard
  2004-08-14  6:58   ` Paul Jarc
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan de Boyne Pollard @ 2004-08-13  9:41 UTC (permalink / raw)
  Cc: supervision

DP> I use the following script to start/restart DNS services:
DP> http://km3t.org/dns

1.  This will only be necessary if you have configured your services to 
initially be in the "down" state.
2.  "Restart" is better implemented as "svc -t" rather than as "svc 
-du", since the latter has the side-effect of changing the current state 
(to "up") whereas the former does not.

DP> Here is my /etc/inittab:
DP> http://km3t.org/inittab

The root cause of your problem is the fact that you have told "init" not 
to bring up "svscan" until _after_ all of your "rc[0-9]" scripts have 
been run.  Reconfigure so that "init" starts "svscan" _before_ your 
run-level scripts are invoked.

DP> Any ideas or help appreciated.

<URL:http://homepages.tesco.net./~J.deBoynePollard/Softwares/solaris-and-daemontools.html>
<URL:http://smarden.org/runit/runscripts.html>

The only jobs of a "run level" should be
* to change the ("up","down") states of a set of services,
and
* to (indirectly) trigger various one-time transition actions (e.g. by 
modifying "/etc/runit/{stopit,reboot}").



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

* Re: Linux startup issue
  2004-08-13  9:41 ` Linux startup issue Jonathan de Boyne Pollard
@ 2004-08-14  6:58   ` Paul Jarc
  2004-08-14 17:20     ` Stefan Karrmann
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Jarc @ 2004-08-14  6:58 UTC (permalink / raw)


Jonathan de Boyne Pollard <J.deBoynePollard@Tesco.NET> wrote:
> 2.  "Restart" is better implemented as "svc -t" rather than as "svc
> -du", since the latter has the side-effect of changing the current
> state (to "up") whereas the former does not.

More specifically:
- If the service is down to begin with, "svc -t" will have no effect;
  "svc -du" will bring the service up, with automatic restarting.
- If the service is running once from "svc -o", then "svc -t" will
  take it down and leave it down; "svc -du" will take it down and
  bring it back up, with automatic restarting; "svc -do" will take it
  down and bring it back up, without automatic restarting, just as it
  was originally.  (supervise publishes enough information in
  supervise/status to distinguish the "-o" state from the "-u" state,
  but svstat doesn't report it.)
- "svc -d" sends SIGTERM and SIGCONT, so if the service is stopped
  with SIGSTOP, it will be allowed to run again so it can exit.
  "svc -t" sends only SIGTERM, which is not sufficient to kill a
  stopped process, but it can be combined with "svc -c" for the same
  effect as "svc -d" (without turning off restarting).


paul


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

* Re: Linux startup issue
  2004-08-14  6:58   ` Paul Jarc
@ 2004-08-14 17:20     ` Stefan Karrmann
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Karrmann @ 2004-08-14 17:20 UTC (permalink / raw)
  Cc: dns

Paul Jarc (Sat, Aug 14, 2004 at 02:58:26AM -0400):
> Jonathan de Boyne Pollard <J.deBoynePollard@Tesco.NET> wrote:
> > 2.  "Restart" is better implemented as "svc -t" rather than as "svc
> > -du", since the latter has the side-effect of changing the current
> > state (to "up") whereas the former does not.
> 
> More specifically:
> - If the service is down to begin with, "svc -t" will have no effect;
>   "svc -du" will bring the service up, with automatic restarting.
> - If the service is running once from "svc -o", then "svc -t" will
>   take it down and leave it down; "svc -du" will take it down and
>   bring it back up, with automatic restarting; "svc -do" will take it
>   down and bring it back up, without automatic restarting, just as it
>   was originally.  (supervise publishes enough information in
>   supervise/status to distinguish the "-o" state from the "-u" state,
>   but svstat doesn't report it.)
> - "svc -d" sends SIGTERM and SIGCONT, so if the service is stopped
>   with SIGSTOP, it will be allowed to run again so it can exit.
>   "svc -t" sends only SIGTERM, which is not sufficient to kill a
>   stopped process, but it can be combined with "svc -c" for the same
>   effect as "svc -d" (without turning off restarting).

My 2 cent:

- Use svc -tcu if the service is up.
- Use svc -tco if the service is running once.

-- 
Stefan


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

end of thread, other threads:[~2004-08-14 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.61.0408121801310.23255@avion.km3t.org>
2004-08-13  9:41 ` Linux startup issue Jonathan de Boyne Pollard
2004-08-14  6:58   ` Paul Jarc
2004-08-14 17:20     ` Stefan Karrmann

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