From: Eric Salama Date: Tue, 16 Mar 2021 14:11:17 +0000 (+0100) Subject: MINOR: mworker/cli: alert the user if we enabled a master CLI but not the master... X-Git-Tag: v2.4-dev13~27 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=5ba8335186c82265a328b035afede88ecd5b33a5;p=haproxy-2.5.git MINOR: mworker/cli: alert the user if we enabled a master CLI but not the master-worker mode Declaring a master CLI socket without activating the master-worker mode is likely a user error, so we issue a warning. This patch can be backported as far as 1.8. --- diff --git a/src/haproxy.c b/src/haproxy.c index 89062b6..3efbac0 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1950,6 +1950,10 @@ 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"); + } + if (global.nbproc > 1 && !global.nbthread) { ha_warning("nbproc is deprecated!\n" " | For suffering many limitations, the 'nbproc' directive is now deprecated\n"