From: William Lallemand Date: Tue, 31 Oct 2023 17:59:29 +0000 (+0100) Subject: MEDIUM: systemd: be more verbose about the reload X-Git-Tag: v2.9-dev9~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e826bc3dfa167b2b4596fcf22d9c9a4575c52040;p=thirdparty%2Fhaproxy.git MEDIUM: systemd: be more verbose about the reload When the `haproxy -c` check during the reload fails, no error is output in the logs, this can be quite bothersome to understand what's going on. This patch removes the -q option on the check so we can see the error with `journalctl -u haproxy` or `systemctl status haproxy` This will change the behavior when the check works, and will display "Configuration file is valid" Note that in some case this test could be completely removed, because the master process loads the configuration itself and is able to keep the previous workers running when the reload failed. This is interesting to disable the test when there are a lot of certificates of files to load, to divide the reload time by 2. No need to backport. --- diff --git a/admin/systemd/haproxy.service.in b/admin/systemd/haproxy.service.in index eb1ad428b9..22a53d8aab 100644 --- a/admin/systemd/haproxy.service.in +++ b/admin/systemd/haproxy.service.in @@ -8,7 +8,7 @@ EnvironmentFile=-/etc/default/haproxy EnvironmentFile=-/etc/sysconfig/haproxy Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" "EXTRAOPTS=-S /run/haproxy-master.sock" ExecStart=@SBINDIR@/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS -ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -c -q $EXTRAOPTS +ExecReload=@SBINDIR@/haproxy -Ws -f $CONFIG -c $EXTRAOPTS ExecReload=/bin/kill -USR2 $MAINPID KillMode=mixed Restart=always