BUG/MEDIUM: mworker: set the master variable earlier
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 14 Nov 2023 12:58:53 +0000 (13:58 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 14 Nov 2023 13:32:39 +0000 (14:32 +0100)
commitd76fa37534b75a746ea799ed79a6377d449f22f6
treeff3ba33fbddbe0daf8241360f8ee33db7002608f
parenta63e016d272ac5e8127a7a8f0d737e19fc6eac74
BUG/MEDIUM: mworker: set the master variable earlier

Since 2.7 and the mcli_reload_bind_conf (56f73b21a5c), upon a reload
failure because of a bind error, the mcli_reload_bind_conf go through a
sock_unbind((). This is not supposed to do anything when a listener is
RX_F_INHERITED in the master, but unfortunately this is done too early
and provokes an exit of the master.

We already suspected in the past that setting the 'master' variable this
late could have negative impact.

The fix sets the master variable earlier before the bind.

This must be backported at least to 2.7. This could be backported
earlier but better wait any feedbacks on the fix.
src/haproxy.c