mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
BUG/MINOR: cli/mworker: can't start haproxy with 2 programs
When trying to start HAProxy with the master CLI and more than one program in the configuration, it refuses to start with: [ALERT] 013/132926 (1378) : parsing [cur--1:0] : proxy 'MASTER', another server named 'cur--1' was already defined at line 0, please use distinct names. [ALERT] 013/132926 (1378) : Fatal errors found in configuration. The problem is that haproxy tries to create a server for the MASTER proxy but only the worker are supposed to be in the server list. Fix issue #446. Must be backported as far as 2.0.
This commit is contained in:
parent
c7ce4e3e7f
commit
a31b09e982
@ -2453,6 +2453,10 @@ int mworker_cli_proxy_create()
|
|||||||
int port1, port2, port;
|
int port1, port2, port;
|
||||||
struct protocol *proto;
|
struct protocol *proto;
|
||||||
|
|
||||||
|
/* only the workers support the master CLI */
|
||||||
|
if (!(child->options & PROC_O_TYPE_WORKER))
|
||||||
|
continue;
|
||||||
|
|
||||||
newsrv = new_server(mworker_proxy);
|
newsrv = new_server(mworker_proxy);
|
||||||
if (!newsrv)
|
if (!newsrv)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user