]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream: Properly handle "on-marked-up shutdown-backup-sessions"
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Jan 2025 15:17:27 +0000 (16:17 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Jan 2025 13:53:37 +0000 (14:53 +0100)
commit0a52a75ef7151a187b42cae6d49a75b79380f211
treee97b28bceb5139c3c8d1c1bb62ec39e480bc376f
parent26b3e5236fc93baeec0df7c6c4c23a20d1985749
BUG/MINOR: stream: Properly handle "on-marked-up shutdown-backup-sessions"

shutdown-backup-sessions action for on-marked-up directive does not work anymore
since the stream_shutdown() function was modified to be async-safe.

When stream_shutdown() was modified to be async-safe, dedicated task events were
added to map the reasons to shut a stream down. SF_ERR_DOWN was mapped to
TASK_F_EVT1 and SF_ERR_KILLED was mapped to TASK_F_EVT2. The reverse mapping was
performed by process_stream() to shut the stream with the appropriate reason.

However, SF_ERR_UP reason, used by shutdown-backup-sessions action to shut a
stream down because a preferred server became available, was not mapped in the
same way. So since commit b8e3b0a18d ("BUG/MEDIUM: stream: make
stream_shutdown() async-safe"), this action is ignored and does not work
anymore.

To fix an issue, and being able to bakcport the fix, a third task event was
added. TASK_F_EVT3 is now mapped on SF_ERR_UP.

This patch should fix the issue #2848. It must be backported as far as 2.6.
doc/internals/api/scheduler.txt
include/haproxy/stream.h
include/haproxy/task-t.h
src/stream.c