BUG/MINOR: cli: Wait for the last ACK when FDs are xferred from the old worker
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Feb 2025 14:16:15 +0000 (15:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 09:35:04 +0000 (10:35 +0100)
commit4a4e00637418f5342e6cbae8898cb1907b442e87
tree7e35102844f9f93eca784d437052856f2a5e7779
parent05c1745459966d128ab9798f3721b889a2a135fd
BUG/MINOR: cli: Wait for the last ACK when FDs are xferred from the old worker

On reload, the new worker requests bound FDs to the old one. The old worker
sends them in message of at most 252 FDs. Each message is acknowledged by
the new worker. All messages sent or received by the old worker are handled
manually via sendmsg/recv syscalls. So the old worker must be sure consume
all the ACK replies. However, the last one was never consumed. So it was
considered as a command by the CLI applet. This issue was hidden since
recently. But it was the root cause of the issue #2862.

Note this last ack is also the first one when there are less than 252 FDs to
transfer.

This patch must be backported to all stable versions.

(cherry picked from commit 49b7bcf583261efedabad5ba15c4026f2e713c61)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/cli.c