From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1106 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: svwaitup != sv start Date: Thu, 4 May 2006 07:10:44 +0000 Message-ID: <20060504071044.20938.qmail@c76e844cce5dae.315fe32.mid.smarden.org> References: <20060406201647.GB19589@home.power> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146726628 32444 80.91.229.2 (4 May 2006 07:10:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 May 2006 07:10:28 +0000 (UTC) Original-X-From: supervision-return-1342-gcsg-supervision=m.gmane.org@list.skarnet.org Thu May 04 09:10:26 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1FbXyj-0005Hf-QQ for gcsg-supervision@gmane.org; Thu, 04 May 2006 09:10:25 +0200 Original-Received: (qmail 19545 invoked by uid 76); 4 May 2006 07:10:46 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 19540 invoked from network); 4 May 2006 07:10:45 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20060406201647.GB19589@home.power> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1106 Archived-At: 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.