]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: cfgparse: deprecate 'master-worker' keyword alone
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 5 Nov 2025 10:34:06 +0000 (11:34 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 5 Nov 2025 10:49:11 +0000 (11:49 +0100)
Warn when the 'master-worker' keyword is used without
'no-exit-on-failure'.

Warn when the 'master-worker' keyword is used and -W and -Ws already set
the mode.

src/cfgparse-global.c

index 6ad44e6a8f4323573e14cd51fd99201df1385e7f..bbd45a2df3b3843a0fe1f8a6c86faa58b991ed9b 100644 (file)
@@ -962,6 +962,13 @@ static int cfg_parse_global_master_worker(char **args, int section_type,
        if (too_many_args(1, args, err, NULL))
                return -1;
 
+       if (!*args[1]) {
+               if (global.mode & MODE_MWORKER) {
+                       ha_warning("master-worker mode is already configured.\n");
+               }
+               ha_warning("The '%s' keyword is deprecated in 3.3 and will be removed in 3.5. Use -W or -Ws in the startup script instead.\n", args[0]);
+       }
+
        if (*args[1]) {
                if (strcmp(args[1], "no-exit-on-failure") == 0)
                        global.tune.options |= GTUNE_NOEXIT_ONFAILURE;