Its toally dirty, but we have our wrapper check for such exceptions, then
force a listener if an haproxy listener doesn't exist after a
reload/restart to the existing (now dead) haproxy process. I've grown to
not fret about such dirty when running haproxy dev branch, but ymmv.
https://github.com/flores/haproxyctl
On Wednesday, June 6, 2012, Senthil sent...@netmagicsolutions.com wrote:
Hi,
We faced with haproxy, we have a script which deletes the
frontend and backend entries of haproxy based on name and does a reload
of
haproxy after haproxy file check is done.
In one such scenario after deleting the frontend and backend and
reloading
we found that haproxy was in stop state
Below are the logs which shows the backend was started again during
reload
but the frontends were not started and the same are shown in logs
after we manually restarted
haproxy
Any feedback regarding this will be very useful.
Regards
Senthil
May 18 19:36:10 indya-lb haproxy[7375]: Stopping frontend ssl_frontend_1
in 0 ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping backend
ssl_frontend_1BACK in 0 ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping frontend
ssl_frontend_2 in 0 ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping backend
ssl_frontend_2BACK in 0 ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping frontend Star in 0 ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping backend StarBACK in 0
ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping frontend Staging in 0
ms.
May 18 19:36:10 indya-lb haproxy[7375]: Stopping backend StagingBACK in
0 ms.
May 18 19:36:10 indya-lb haproxy[13147]: Proxy ssl_frontend_2BACK
started.
May 18 19:36:10 indya-lb haproxy[13147]: Proxy StarBACK started.
May 18 19:36:10 indya-lb haproxy[13147]: Proxy StagingBACK started.
May 18 19:36:10 indya-lb haproxy[7375]: Proxy ssl_frontend_1 stopped
(FE: 3886 conns, BE: 0 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy ssl_frontend_1BACK
stopped (FE: 0 conns, BE: 3583 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy ssl_frontend_2 stopped
(FE: 0 conns, BE: 0 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy ssl_frontend_2BACK
stopped (FE: 0 conns, BE: 0 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy Star stopped (FE:
60927284 conns, BE: 0 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy StarBACK stopped (FE: 0
conns, BE: 59690087 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy Staging stopped (FE: 0
conns, BE: 0 conns).
May 18 19:36:10 indya-lb haproxy[7375]: Proxy StagingBACK stopped (FE:
0 conns, BE: 0 conns).
May 18 20:09:32 indya-lb haproxy[13204]: Proxy ssl_frontend_2 started.
May 18 20:09:32 indya-lb haproxy[13204]: Proxy ssl_frontend_2BACK
started.
May 18 20:09:32 indya-lb haproxy[13204]: Proxy Star started.
May 18 20:09:32 indya-lb haproxy[13204]: Proxy StarBACK started.
May 18 20:09:32 indya-lb haproxy[13204]: Proxy Staging started.
May 18 20:09:32 indya-lb haproxy[13204]: Proxy StagingBACK started.
We are the using the init script to reload haproxy service haproxy
reload in centos and the script is as follows
#!/bin/sh
#
# chkconfig: - 85 15
# description: HA-Proxy is a TCP/HTTP reverse proxy which is
particularly
suited
\
# for high availability environments.
# processname: haproxy
# config: /etc/haproxy.cfg
# pidfile: /var/run/haproxy.pid
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = no ] exit 0
--
CAUTION - Disclaimer * This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you
are not to copy, disclose, or distribute this e-mail or its contents to any
other person and any such actions are unlawful. This e-mail may contain
viruses. Netmagic Solutions Pvt. Ltd. has taken every reasonable precaution
to minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own virus
checks before opening the e-mail or attachment. Netmagic Solutions Pvt.
Ltd. reserves the right to monitor and review the content of all messages
sent to or from this e-mail address. Messages sent to or from this e-mail
address may be stored on the Netmagic Solutions Pvt. Ltd.'s e-mail system.
* End of Disclaimer