]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init: check MODE_MWORKER before creating master CLI
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Fri, 9 Aug 2024 16:05:23 +0000 (18:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
commite4c10a704d3374e1e51efe820b865f62fe5b3844
tree3a7db56b0e5af0d4acf1ea6551b214af5ff9a934
parent26e53e2e8c2d3b65d6bca4fabff7cb0d185ae8f4
MINOR: init: check MODE_MWORKER before creating master CLI

mworker_create_master_cli() creates MASTER proxy and allocates listeners,
which are attached to this proxy. It also creates a reload sockpair.

So, it's more appropriate to do the check, that we are in a MODE_MWORKER, if
master CLI settings were provided via command line, just after the config
parsing. And only then, if runtime mode and command line settings are
coherent, try to perform master-worker fork and try to create master CLI.
src/haproxy.c