BUG/MINOR: mworker/cli: fix set severity-output support
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 6 Dec 2023 10:15:01 +0000 (11:15 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 8 Dec 2023 13:27:35 +0000 (14:27 +0100)
commitf2ce92bc16c4abde7eb98a5abf8c9279770a9e82
tree4a018be2615620a0d612789e55cddf3a232e8c6e
parentcdecaa8efc4bb9c69bdb0da12005cecd5d7a26b6
BUG/MINOR: mworker/cli: fix set severity-output support

"set severity-output" is one of these command that changes the appctx
state so the next commands are affected.

Unfortunately the master CLI works with pipelining and server close
mode, which means the connection between the master and the worker is
closed after each response, so for the next command this is a new appctx
state.

To fix the problem, 2 new flags are added ACCESS_MCLI_SEVERITY_STR and
ACCESS_MCLI_SEVERITY_NB which are used to prefix each command sent to
the worker with the right "set severity-output" command.

This patch fixes issue #2350.

It could be backported as far as 2.6.

(cherry picked from commit 1c1bb8ef2abeab2dc8e4857ec2fef2b19b472be7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/cli-t.h
src/cli.c