-
I use default systemd-reloads
ExecReload=/usr/sbin/haproxy -f $CONFIG -c -q
ExecReload=/bin/kill -USR2 $MAINPID -
Haproxy’s management manual says:
First, the service script (/etc/init.d/haproxy or equivalent) will verify that
the configuration file parses correctly using “haproxy -c”. After that it will
try to start haproxy with this configuration file, using “-st” or “-sf”.
However if I try to reload invalid config - all old process die immediately.
Of cause it is easy to solve problem by using “haproxy -c -f /etc/haproxy/haproxy.cfg && service haproxy reload”. But it is not correct way with double validation.
Is there any better solution for this case?