Hi Guido,

the dependencies in Monit are currently "soft" ... Monit performs the actions 
based on the dependency tree, but doesn't wait/verify that the "parent" service 
is functional before starting "children" services.

We plan to fix the dependencies to work exactly the same as you described.


Regards,
Martin



> On 13 Mar 2015, at 19:44, Guido Accardo <[email protected]> wrote:
> 
> HI all,
> 
>   I'm reading about service dependencies but I couldn't find any regarding 
> monit  waiting for a give process to start before starts another one. I have 
> a Python based service that depends on redis-server to work, so here is the 
> configuration:
> 
> 
> check process redis-server with pidfile /var/run/redis/redis-server.pid
>   start program "/etc/init.d/redis-server start" with timeout 60 seconds
>   stop program "/etc/init.d/redis-server stop"
> 
> 
> check process insert with pidfile /tmp/service.pid
>   start program "/root/init.sh start"
>   stop program "/root/init.sh stop"
>   depends on redis-server
> 
> 
> When I start the insert process, monit starts it and also starts redis-server 
> as expected but both at the same time. Given that my redis-server has to load 
> a huge dataset, it takes about 40 seconds to initiate so insert start 
> complaining about can't connecting to redis. 
> 
> Is there a way that I can tell monit to make sure redis-server is in running 
> state before execute the start of insert?
> 
> Can you tell me I there is another documentation but this 
> http://mmonit.com/monit/documentation/monit.html#SERVICE-DEPENDENCIES 
> <http://mmonit.com/monit/documentation/monit.html#SERVICE-DEPENDENCIES> 
> regarding this topic?
> 
> Thank you in advance.
> 
> -- 
> ---
> Guido Accardo
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to