]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mworker: create the mcli_reload socketpairs in case of upgrade
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 7 Dec 2022 13:25:41 +0000 (14:25 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 7 Dec 2022 14:30:52 +0000 (15:30 +0100)
commite57b702e2bd6c0d3787c5996a89ec8513b5c4bc9
treedb2b14b39d41fce9a8afd08718bee239aa95ed2e
parent035058e8bfe4fc731b2ede8fcdc2b8d14c4936ce
BUG/MEDIUM: mworker: create the mcli_reload socketpairs in case of upgrade

In ticket #1956, it was reported that an upgrade from 2.6 to 2.7 via a
reload would stop the master process.

When upgrading the binary, the new process is considered reexec and does
not try to creates the socketpair for the mcli_reload listener, then
tries to bind on -1 since the socket doesn't exit. The failure provokes
an exit() of the master.

This patch fixes the issue by trying to create the mcli_reload sockets
only when they don't exist, instead of creating them at first start.
This way we also avoid possible fd leak since we always try to use the
existing FDs first.

Must be backported in 2.7.
src/haproxy.c