]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
ADMIN: reload: introduce -vv mode
authorWilliam Lallemand <wlallemand@irq6.net>
Mon, 29 Sep 2025 17:21:08 +0000 (19:21 +0200)
committerWilliam Lallemand <wlallemand@irq6.net>
Mon, 29 Sep 2025 17:29:10 +0000 (19:29 +0200)
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

index f149ee5de38362aba450119d32793b2ce5327a62..1040771d9d9c819429792109c538c620355f35eb 100755 (executable)
@@ -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 <path>   Use the master socket at <path> (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 <path>   Use the master socket at <path> (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