supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* svwaitup != sv start
@ 2006-04-06 20:16 Alex Efros
  2006-05-04  7:10 ` Gerrit Pape
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Efros @ 2006-04-06 20:16 UTC (permalink / raw)


Hi!

I found some differences between `svwaitup` logic and `sv start`:

1)  I don't see a way how to "wait until service will be up and running
    for at least X seconds". This lead to race condition error, for example
    if we have this in /service/getty-tty5/run:
        #!/bin/sh
	/etc/setfont tty5
	exit
	exec /sbin/agetty 38400 tty5 linux
    and then will run `sv start getty-tty5` a couple of times we will see
    some success and some failures.

2)  If ./finish is running now, `sv start` will report service as running,
    but this is wrong. (I've "sleep 3" in ./finish for XWindow service, to
    prevent X from restarting too fast.)

Any ideas how to use `sv start` to make it as reliable as `svwaitup` was?

-- 
			WBR, Alex.


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

* Re: svwaitup != sv start
  2006-04-06 20:16 svwaitup != sv start Alex Efros
@ 2006-05-04  7:10 ` Gerrit Pape
  0 siblings, 0 replies; 2+ messages in thread
From: Gerrit Pape @ 2006-05-04  7:10 UTC (permalink / raw)


On Thu, Apr 06, 2006 at 11:16:47PM +0300, Alex Efros wrote:
> I found some differences between `svwaitup` logic and `sv start`:
> 
> 1)  I don't see a way how to "wait until service will be up and running
>     for at least X seconds". This lead to race condition error, for example
>     if we have this in /service/getty-tty5/run:
>         #!/bin/sh
> 	/etc/setfont tty5
> 	exit
> 	exec /sbin/agetty 38400 tty5 linux
>     and then will run `sv start getty-tty5` a couple of times we will see
>     some success and some failures.

The sv program utilizes the ./check script in service directories for
this purpose.  After all it's always a race condition, the service
daemon can terminate just at the time it is considered to be up and
running, and reported so.

> 2)  If ./finish is running now, `sv start` will report service as running,
>     but this is wrong. (I've "sleep 3" in ./finish for XWindow service, to
>     prevent X from restarting too fast.)

I've fixed that in 1.5.0.

> Any ideas how to use `sv start` to make it as reliable as `svwaitup` was?

I suggest to try to provide an appropriate ./check script for this
service.

Thanks, Gerrit.


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

end of thread, other threads:[~2006-05-04  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-06 20:16 svwaitup != sv start Alex Efros
2006-05-04  7:10 ` 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).