]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli/threads: always bind CLI to thread group 1
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Jul 2022 09:52:24 +0000 (11:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Jul 2022 17:43:10 +0000 (19:43 +0200)
When using multiple groups, the stats socket starts to emit errors and
it's not natural to have to touch the global section just to specify
"thread 1/all". Let's pre-attach these sockets to thread group 1. This
will cause errors when trying to change the group but this really is not
a problem for now as thread groups are not enabled by default. This will
make sure configs remain portable and may possibly be relaxed later.

src/cli.c

index abec46bf9cf366c4d74562647e329f12574e68ad..722d0c63d9e731dc0ab9ae287896c7cabb3c749d 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -492,6 +492,7 @@ static int cli_parse_global(char **args, int section_type, struct proxy *curpx,
                }
                bind_conf->level &= ~ACCESS_LVL_MASK;
                bind_conf->level |= ACCESS_LVL_OPER; /* default access level */
+               bind_conf->bind_tgroup = 1; // bind to a single group in any case
 
                if (!str2listener(args[2], global.cli_fe, bind_conf, file, line, err)) {
                        memprintf(err, "parsing [%s:%d] : '%s %s' : %s\n",