From 6316f958e3952d0791ea370954f824085eb297f0 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 29 Sep 2025 19:21:08 +0200 Subject: [PATCH] ADMIN: reload: introduce -vv mode The -v verbose mode displays the loading messages returned by the master CLI reload command upon error. The new -vv mode displays the loading messages even upon success, showing the content of `show startup-logs` after the reload attempt. --- admin/cli/haproxy-reload | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/admin/cli/haproxy-reload b/admin/cli/haproxy-reload index f149ee5de..1040771d9 100755 --- a/admin/cli/haproxy-reload +++ b/admin/cli/haproxy-reload @@ -28,6 +28,8 @@ reload() { else if [ "$RET" = 1 ] && [ "$VERBOSE" = "2" ]; then echo "$line" >&2 + elif [ "$VERBOSE" = "3" ]; then + echo "$line" >&2 fi fi @@ -50,12 +52,13 @@ usage() { echo " EXPERIMENTAL script!" echo "" echo "Options:" - echo " -S, --master-socket Use the master socket at (default: ${MASTER_SOCKET})" - echo " -d, --debug Debug mode, set -x" - echo " -t, --timeout Timeout (socat -t) (default: ${TIMEOUT})" - echo " -s, --silent Slient mode (no output)" - echo " -v, --verbose Verbose mode (output from haproxy)" - echo " -h, --help This help" + echo " -S, --master-socket Use the master socket at (default: ${MASTER_SOCKET})" + echo " -d, --debug Debug mode, set -x" + echo " -t, --timeout Timeout (socat -t) (default: ${TIMEOUT})" + echo " -s, --silent Slient mode (no output)" + echo " -v, --verbose Verbose output (output from haproxy on failure)" + echo " -vv Even more verbose output (output from haproxy on success and failure)" + echo " -h, --help This help" echo "" echo "Examples:" echo " $0 -S ${MASTER_SOCKET} -d ${TIMEOUT}" @@ -81,6 +84,10 @@ main() { VERBOSE=2 shift ;; + -vv|--verbose) + VERBOSE=3 + shift + ;; -d|--debug) DEBUG=1 shift -- 2.47.3