monit-general
[Top][All Lists]
Advanced

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

Re:Can monit block/wait on start/stop exec at all? (Chris McKenzie


From: Jason L. Buberel
Subject: Re:Can monit block/wait on start/stop exec at all? (Chris McKenzie
Date: Thu, 17 May 2007 09:47:43 -0700
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

Chris,

I have run into the same problem you describe below and had event sent a message to this list regarding the issue. At the time, I did not receive any reply.

I know for a fact that monit is not blocking or waiting for the exec to complete when I see lines in my syslog like:

May 15 09:14:37 lenny monit[25262]: 'apache' trying to restart
May 15 09:14:37 lenny monit[25262]: 'apache' stop: /etc/init.d/httpd
May 15 09:14:39 lenny monit[25262]: 'apache' start: /etc/init.d/httpd

Notice the 2-second interval between 'stop' and 'start'? The problem is that my 'stop' script contains the following:

sleep 10

So unless my understanding of the theory of relativity is horribly wrong, there is definitely a problem here :)

-jason

address@hidden wrote:
----------------------------------------------------------------------

Date: Thu, 17 May 2007 11:51:28 -0400
From: "Chris McKenzie" <address@hidden>
Subject: Can monit block/wait on start/stop exec at all?
Hi all.

Can monit block or wait for a stop/start call to complete? I never had any problems with service restart scripts that would call monit to stop a bunch of service, perform some config or maintenance task, then start them back up again on RedHat Enterprise Linux 3, but after upgrading to RHEL4 I've been finding some strange behaviour that's not easy to nail down.

I don't know if its something new in RHEL4 or its kernel but monit will exec/fork the stop call and return or complete its own execution before the process has stopped. Even in cases where I've beefed up the init.d script to most definately wait for all pids to exit before returning.

Is there any way to get monit to block on program exec? This would be super helpful. I understand the reasons it currently doesn't and I'm fine with that. But if you could identify a single process in its config and block on the program's exec, it would make integrating/automating monit that much easier.

I can always build a wait block after the monit stop service calls before continuing but its the kind of thing you put into the init script.

Thanks!

- Chris





reply via email to

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