]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mworker/cli: reload command displays the startup-logs
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 13 Oct 2022 15:49:54 +0000 (17:49 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 13 Oct 2022 15:59:48 +0000 (17:59 +0200)
commitec1f8a62cab5666d0aa6b5cd8513b2661ce6d8fd
treeabe2cb20dd0e53748abe370593f332dea871fd3d
parenteba6a54cd4c774fe06cf5f60a86192855ae4fee2
MINOR: mworker/cli: reload command displays the startup-logs

Change the output of the "reload" command, it now displays "Success=0"
if the reload failed and "Success=1" if it succeed.

If the startup-logs is available (USE_SHM_OPEN=1), the command will
print a "--\n" line, followed by the content of the startup-logs.

Example:

$ echo "reload" | socat /tmp/master.sock -
Success=1
--
[NOTICE]   (482713) : haproxy version is 2.7-dev7-4827fb-69
[NOTICE]   (482713) : path to executable is ./haproxy
[WARNING]  (482713) : config : 'http-request' rules ignored for proxy 'frt1' as they require HTTP mode.
[NOTICE]   (482713) : New worker (482720) forked
[NOTICE]   (482713) : Loading success.

$ echo "reload" | socat /tmp/master.sock -
Success=0
--
[NOTICE]   (482886) : haproxy version is 2.7-dev7-4827fb-69
[NOTICE]   (482886) : path to executable is ./haproxy
[ALERT]    (482886) : config : parsing [test3.cfg:1]: unknown keyword 'Aglobal' out of section.
[ALERT]    (482886) : config : Fatal errors found in configuration.
[WARNING]  (482886) : Loading failure!

$
src/mworker.c