From 3ac3a06963e0b33fa0d1cab511c865432eb9b665 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Thu, 9 Nov 2023 15:02:13 +0100 Subject: [PATCH] MEDIUM: mworker: -W is mandatory when using -S Defining a master CLI without the master-worker mode emits a warning since version 1.8. This patch enforce the behavior by forbiding the usage of the -S option without the master-worker mode. --- src/haproxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/haproxy.c b/src/haproxy.c index 7a4f49fa69..363cbdab27 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2250,7 +2250,8 @@ static void init(int argc, char **argv) } if (!LIST_ISEMPTY(&mworker_cli_conf) && !(arg_mode & MODE_MWORKER)) { - ha_warning("a master CLI socket was defined, but master-worker mode (-W) is not enabled.\n"); + ha_alert("a master CLI socket was defined, but master-worker mode (-W) is not enabled.\n"); + exit(EXIT_FAILURE); } /* destroy unreferenced defaults proxies */ -- 2.47.3