]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: init: stop disabled proxies after initializing fdtab
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Oct 2020 16:36:54 +0000 (18:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:29 +0000 (11:27 +0200)
commit02b092f00606c9de3a8f315831d274f93ffa4f08
treedbfbe470343f8811896c6edfb07fb54b918fae6d
parentcb89e32f31390906d738f54cf70ee418ea250f8b
MEDIUM: init: stop disabled proxies after initializing fdtab

During the startup process we don't have any fdtab nor fd_updt for quite
a long time, and as such some operations on the listeners are not
permitted, such as fd_want_*/fd_stop_* or fd_delete(). The latter is of
particular concern because it's used when stopping a disabled frontend,
and it's performed very early during check_config_validity() while there
is no fdtab yet. The trick till now relies on the listener's state which
is a bit brittle.

There is absolutely no valid reason for stopping a proxy's listeners this
early, we can postpone it after init_pollers() which will at least have
allocated fdtab.
src/cfgparse.c
src/haproxy.c