Martin Pala <address@hidden> writes:
- there are more then one monitored services which uses the same start
method
- or there are more then one test inside monitored service which uses
the same start method
The first case (more then one service using the same start method)
seems like configuration error (dependency can be used), but the
second case can occure in praxis, for example:
check process myprocess with pidfile /var/run/myprocess.pid
start program = "/etc/init.d/myprocess start"
stop program = "/etc/init.d/myprocess stop"
if failed port 80 then restart
if failed port 443 then restart
Monit will test all ports regardless of the particular result. In the
case that the first will fail, monit will call stop and start methods
via restart event and continue the testing immediately.
Not for restart I think? In eval_action():validate.c, FALSE is
returned which will later in the call stack lead to abortion of more
tests on the service. For exec and alert the test will continue, but
not for restart. In other words, if the first port test should fail,
monit will restart the service and not execute the second port test,
i.e. at 443. At least this is how things look when I read the code.
Admittedly there may be some issues with race conditions. I do not
feel completely confident that we have fixed everything, but I think
or rather I hope we have. With the sendmail fix I think we can release
monit tomorrow, or what do you think?