BUG/MEDIUM: peers: re-work connection to new process during reload.
authorEmeric Brun <ebrun@haproxy.com>
Thu, 22 Apr 2021 16:20:37 +0000 (18:20 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Apr 2021 09:11:33 +0000 (11:11 +0200)
commit4c301d52cd21928994647a66cb13ca608fa2192d
tree502a5b811d01ff3db94b6db88d9bac8cb1d81fef
parent536652b4439c67788928be09e6aa1ca5e65bea82
BUG/MEDIUM: peers: re-work connection to new process during reload.

The peers task handling the "stopping" could wake up multiple
times in stopping state with WOKEN_SIGNAL: the connection to the
local peer initiated on the first processing was immediatly
shutdown by the next processing of the task and the old process
exits considering it is unable to connect. It results on
empty stick-tables after a reload.

This patch checks the flag 'PEERS_F_DONOTSTOP' to know if the
signal is considered and if remote peers connections shutdown
is already done or if a connection to the local peer must be
established.

This patch should be backported on all supported branches (v >= 1.6)

(cherry picked from commit cbfe5ebc1cc362b0ca33206ba6f49923587a372b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1efabf19523992a431358fbb2c93e5cf53653015)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 901f71dfa716751cca4a8ad501392dfd42e953b5)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/peers.c