Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

How to make reloads safe in case of invalid config

$
0
0

@happy wrote:

  • 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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>