monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: depend take 2


From: Martin Pala
Subject: Re: depend take 2
Date: Wed, 18 Dec 2002 14:29:35 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203

Jan-Henrik Haukeland wrote:

Martin Pala <address@hidden> writes:

*
If you mean, foo->bar, that is, foo depends on bar to run before it
starts, I think that the present syntax is better, since you can sort
of read it like: "check foo and depend on bar to be running".

I think we speak about same thing, but thinking about foo and bar in
juxtaposition :)


Preposition:
There are processes foo and bar. Foo will not start until bar is up
and running (foo depends on bar), in SYSVR5 language (just for
start-up order example - it doesn't take care about real state of bar):


/etc/rc3.d/S98bar
/etc/rc3.d/S99foo


1.) Summary of present logic:

You must declare all dependencies for the master process
configuration, so value of "depend" statement is name of the process,
that should be started AFTER process where "depend" statement is
mentioned:


###
check bar with pidfile "/var/run/bar.pid"
depend foo
...

check foo with pidfile "/var/run/foo.pid"
...
###

=> check bar and its dependant foo that should be runned after bar


2.) Summary of the other  (proposed)  design:

You must use depend statement to declare master process, so value of
"depend" statement is process, that should be started BEFORE process
where "depend" statement is mentioned:


###
check bar with pidfile "/var/run/bar.pid"
...

check foo with pidfile "/var/run/foo.pid"
depend bar
...
###

=> check foo and depend on bar to be running before foo


Both designs are possible, it just about the "feeling". I thing second
version is more usual/nature in real world, but it doesn't matter :)

Laying it out like that I can see your point. It *does* look more
logical, maybe what was confusing me a bit was the name of the
statement, that is, "depend", in your case the keyword should probably
be "dependant" which makes it more clear. What do you say Rory?

Good sugestion - if we stay with present design, i'm +1 to change "depend" keyword to "dependant"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]