monit-dev
[Top][All Lists]
Advanced

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

Re: depend take 2


From: Jan-Henrik Haukeland
Subject: Re: depend take 2
Date: 17 Dec 2002 22:55:33 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Rory Toma <address@hidden> writes:

> What do you mean by "not as expected" - in case it's how I expect it
> to work. 8-)

Sorry, I should have elaborate more instead of throwing it out like
that; Well the first thing I noticed was the 1 cycle wait to start a
dependant process. I know you mentioned something about this before
but at the time I wasn't thinking much about it, that is, until now
when I have tried it now for myself :) I have short of manages to fix
the problem (I think?) with this code which is a bit faster in
control.c:atomic_control_process:

  if(is(action, "start")) {
    ASSERT(p->start);
    if(! is_process_running(p)) {
      int max_tries= 10;
      log("%s: (%s) %s\n", action, p->name, p->start->arg[0]);
      spawn(p, p->start);
      p->visited= TRUE;
      while(max_tries--) {
        if(is_process_running(p))
            break;
        sleep(1);
      }
    }

The reason it needs to be fixed (at least in my book) is that, for
instance if you have a web server and a databaseserver where the one
depends on the other. If both goes down they should be started in sync
at the same cycle since one will expect monit to act on a problem as
soon as it's discovered.

Another problem I found was that if I run 'monit start' from the
console and both processes is up and running, monit for some reason
kills one. This is what I have found so far and I just want to see if
it's easily fixable :-) Agree?

> 
> On Tue, 2002-12-17 at 12:40, Jan-Henrik Haukeland wrote:
> > Hmm, the depend functionality is much better but still does not work
> > as expected. I'm going to work a bit with on it. In case anyone are
> > planning doing stuff with changing control.c let me know.
> -- 
> Rory Toma             address@hidden
> VP of Run Level 5     http://www.trs80.net
> Digeo Digital         http://www.digeo.com
> _______________________________________________
> monit-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/monit-dev

-- 
Jan-Henrik Haukeland



reply via email to

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