I am running the Zato processes under supervisor, and there is one nagging details that bothers me.
When I stop supervisor, all associated zato processes go down as expected, except haproxy.
So, I have to manually find the haproxy pid and kill it. It seems that haproxy is not a child process
of the load-balancer, so supervisor does not kill it. Is there a particular reason for this?
just to confirm it - the PID files that you need to clear out are in:
But I’m not clear about HAProxy’s not being a child process of the load-balancer? Can you please compare it with servers where, I understand, everything looks correct for you?
Thanks a lot.
The process in ‘pidfile’ gets killed by supervisor, but the process in zato-lb-agent.pid (haproxy) does not.
The reason is that the haproxy process is daemonized. A requirement for processes under supervisor is that
they are not daemonized. So I start load-balancer with the “–fg” flag, but there is no control over the way that
haproxy is started (as far as I can see).
Maybe haproxy can be started without the ‘-D’ flag when the load-balancer is started with ‘–fg’?
you are right that the ‘-D’ flag is not configurable and your suggestion makes sense, thanks for sending it in.
For the time being - will not using supervisor be an option? Instead of it, you could symlink all the components that you need to /etc/zato/components-enabled and then you could do …
$ sudo service zato stop
$ sudo service zato start
… and this would work with all the components that /etc/zato/components-enabled points to.
It will also start them when the OS is booting.