From: Willy Tarreau Date: Wed, 6 Jul 2022 09:46:34 +0000 (+0200) Subject: MINOR: mworker/threads: limit the mworker sockets to group 1 X-Git-Tag: v2.7-dev2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcbd763fe9d133096136c362740d27970aa88ff2;p=thirdparty%2Fhaproxy.git MINOR: mworker/threads: limit the mworker sockets to group 1 As a side effect of commit 34aae2fd1 ("MEDIUM: mworker: set the iocb of the socketpair without using fd_insert()"), a config may now refuse to start if there are multiple groups configured because the default bind mask may span over multiple groups, and it is not possible to force it to work differently. Let's just assign thread group 1 to the master<->worker sockets so that the thread bindings automatically resolve to a single group. The same was done for the master side of the socket even if it's not used. It will avoid being forgotten in the future. --- diff --git a/src/cli.c b/src/cli.c index 485c096622..abec46bf9c 100644 --- a/src/cli.c +++ b/src/cli.c @@ -3009,6 +3009,7 @@ int mworker_cli_proxy_new_listener(char *line) bind_conf->level &= ~ACCESS_LVL_MASK; bind_conf->level |= ACCESS_LVL_ADMIN; bind_conf->level |= ACCESS_MASTER | ACCESS_MASTER_ONLY; + bind_conf->bind_tgroup = 1; // bind to a single group in any case if (!str2listener(args[0], mworker_proxy, bind_conf, "master-socket", 0, &err)) { ha_alert("Cannot create the listener of the master CLI\n"); @@ -3106,6 +3107,7 @@ int mworker_cli_sockpair_new(struct mworker_proc *mworker_proc, int proc) bind_conf->level &= ~ACCESS_LVL_MASK; bind_conf->level |= ACCESS_LVL_ADMIN; /* TODO: need to lower the rights with a CLI keyword*/ bind_conf->level |= ACCESS_FD_LISTENERS; + bind_conf->bind_tgroup = 1; // bind to a single group in any case if (!memprintf(&path, "sockpair@%d", mworker_proc->ipc_fd[1])) { ha_alert("Cannot allocate listener.\n");