From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1589 Path: news.gmane.org!not-for-mail From: "rehan khan" Newsgroups: gmane.comp.sysutils.supervision.general Subject: RE: Customised control help Date: Wed, 2 Jan 2008 06:44:53 -0000 Message-ID: <50F2BE60A0EF6D478B1BCC633DEC28CC01F704@server.home.internal> References: <14AE52C8045C4D1F9AC27FD137DA0657@home.internal> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C84D0B.09CB9422" X-Trace: ger.gmane.org 1199256331 11868 80.91.229.12 (2 Jan 2008 06:45:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Jan 2008 06:45:31 +0000 (UTC) Cc: To: "Charlie Brady" Original-X-From: supervision-return-1824-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Jan 02 07:45:51 2008 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1J9xMJ-0005PD-MT for gcsg-supervision@gmane.org; Wed, 02 Jan 2008 07:45:47 +0100 Original-Received: (qmail 5946 invoked by uid 76); 2 Jan 2008 06:45:31 -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 5939 invoked from network); 2 Jan 2008 06:45:30 -0000 Original-X-Trace: 5601605/mk-outboundfilter-2.mail.uk.tiscali.com/PIPEX/$MX-ACCEPTED/pipex-infrastructure/62.241.162.31 X-SBRS: None X-RemoteIP: 62.241.162.31 X-IP-MAIL-FROM: rehan.khan@dsl.pipex.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAI7Bekc+8aIf/2dsb2JhbACCb6NS Content-class: urn:content-classes:message X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-TNEF-Correlator: Thread-Topic: Customised control help thread-index: AchMk5XRz3DduxlqQ7qaofjD2q1/WAAd2UR+ Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1589 Archived-At: This is a multi-part message in MIME format. ------_=_NextPart_001_01C84D0B.09CB9422 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Charlie Brady budge.apana.org.au> writes: >=20 > Yes, that's what the "for each" means=20 >=20 >=20 > > 4) Is there a more detailed description of customised control = somewhere? >=20 > I think the man page of runsv is complete and accurate. What do you = think=20 > is missing? The source code might help you if you wish to learn more = or to=20 > confirm what you read in the man page. Heh, some of my questions might seem dumb but I have read ALL the docs = many times over. I have found the documentation to be 100% complete. However sometimes it can be difficult to interpret for all situations (or the = particular situation that is in my head :). For example in the above documentation = example it might be better to say that the examples given are special cases or = that they are examples that apply to all the options. Perhaps also to expand on = the description and to describe the exit codes (even if it is repeated from = elsewhere). > So you have to fix the service, or do something other than send a term = > signal to terminate the service. Regarding the t script, I used this : [ -r ../supervise/pid ] && PID=3D`cat ../supervise/pid` && kill "$PID" To term the the process but I think the other methods (setting exit = codes etc) require less processing so I'll switch to those. OK back to the bluetooth example. I had put the post start tasks in the = check script. I found that they were not being run when I rebooted the machine = but were being run if I did anything from the command line. I guess this is = because when runsvdir starts the service it just issues an up command (no check = script is run). I like the idea of the bluetooth-postinit service but it breaks the compatibiltiy with init that I need. Runit services need to exactly = mirror what fedora init looks like and be as self contained as an init script. I = need this mainly so that I can switch between init and runit services through a = (yet to be written) service management gui. It's a shame that runsvdir can't be = told to send a 'start' command instead of an up command. I want to keep things = as simple as possible so that other people might choose to write runit services as = well as an init script. I really appreciate you guys taking the time to answer my questions = especially as it is the holiday period. I have one last issue that I see only occasionally. I have every init = daemon on my laptop using runit. They are all started by runsvdir/runsvchdir. Very occasionally some critical service does not start up during machine boot = with the error 'runsv not started'. I check for the existence of the service directory before starting the service. I think runsvdir has not got to = that particular directory due to delays caused by the i/o frenzy during = startup and the fact that I do quite a lot of script processing (relatively) before = starting a service. This has become quite a big issue for me as I am attempting = to get some kind of LSB compatibility in my setup. So if a 'required-start' = dependancy fails to start I have to shut it down. Right now I am going to deal with = that issue by adding a 'sleep' and retrying if this error occurs. Is there a = better way to avoid this issue? Thanks Rehan ------_=_NextPart_001_01C84D0B.09CB9422 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: Customised control help

Charlie Brady <charlieb-supervision <at> = budge.apana.org.au> writes:

>
> Yes, that's what the "for each" means
>
>
> > 4) Is there a more detailed description of customised control = somewhere?
>
> I think the man page of runsv is complete and accurate. What do you = think
> is missing? The source code might help you if you wish to learn = more or to
> confirm what you read in the man page.


Heh, some of my questions might seem dumb but I have read ALL the docs = many
times over. I have found the documentation to be 100% complete. = However
sometimes it can be difficult to interpret for all situations (or the = particular
situation that is in my head :). For example in the above documentation = example
it might be better to say that the examples given are special cases or = that they
are examples that apply to all the options. Perhaps also to expand on = the
description and to describe the exit codes (even if it is repeated from = elsewhere).


> So you have to fix the service, or do something other than send a = term
> signal to terminate the service.

Regarding the t script, I used this :

[ -r ../supervise/pid ] && PID=3D`cat ../supervise/pid` = && kill "$PID"

To term the the process but I think the other methods (setting exit = codes etc)
require less processing so I'll switch to those.

OK back to the bluetooth example. I had put the post start tasks in the = check
script. I found that they were not being run when I rebooted the machine = but
were being run if I did anything from the command line. I guess this is = because
when runsvdir starts the service it just issues an up command (no check = script
is run).

I like the idea of the bluetooth-postinit service but it breaks the
compatibiltiy with init that I need. Runit services need to exactly = mirror what
fedora init looks like and be as self contained as an init script. I = need this
mainly so that I can switch between init and runit services through a = (yet to be
written) service management gui. It's a shame that runsvdir can't be = told to
send a 'start' command instead of an up command. I want to keep things = as simple
as possible so that other people might choose to write runit services as = well as
an init script.

I really appreciate you guys taking the time to answer my questions = especially
as it is the holiday period.

I have one last issue that I see only occasionally. I have every init = daemon on
my laptop using runit. They are all started by runsvdir/runsvchdir. = Very
occasionally some critical service does not start up during machine boot = with
the error 'runsv not started'. I check for the existence of the = service
directory before starting the service. I think runsvdir has not got to = that
particular directory due to delays caused by the i/o frenzy during = startup and
the fact that I do quite a lot of script processing (relatively) before = starting
a service. This has become quite a big issue for me as I am attempting = to get
some kind of LSB compatibility in my setup. So if a 'required-start' = dependancy
fails to start I have to shut it down. Right now I am going to deal with = that
issue by adding a 'sleep' and retrying if this error occurs. Is there a = better
way to avoid this issue?

Thanks
Rehan

------_=_NextPart_001_01C84D0B.09CB9422--