]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: cli: Restore non-interactive mode behavior with pipelined commands
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Feb 2024 17:39:50 +0000 (18:39 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 23 Feb 2024 14:19:49 +0000 (15:19 +0100)
commit3d93ecc132c591598f8ab6db971845aee0385b82
tree56ccf4c14fc1e6a45b620875fbc77e870f67085f
parent598c7f164c11d39eae0138b64967b6646a2d7fa9
BUG/MAJOR: cli: Restore non-interactive mode behavior with pipelined commands

The issue was decribed in commit "BUG/MEDIUM: cli: Warn if pipelined commands
are delimited by a \n". In non-interactive mode, it was possible to use a
newline character as delimiter for pipelined commands. As a consequence, it was
possible to stop commands processing on the middle.

With the above commit, a warning is emitted to notify users. With this one,
we restore the expected behavior, as documented in the management guide.
Only the first line of commands is parsed. This commit will not be
backported to avoid breaking changes on stable versions.

This commit has of course some visible effects. All script using a newline
character as delimiter to pipeline commands in non-interactive mode will
stop working. Only the first command will be evaluated, all others will be
ignored. Pipelined commands MUST now be separated by a semi-colon.

But there is a more subtle and probably more annoying change. It is no
longer possible to pipeline commands with a payload ! A command with a
payload will always be the last one evaluated because it must be finished by
a newline (eventually preceeded by a custom pattern).

It is really annoying to introduce such breaking change. But, on the long
term, it is mandatory. The 2.8 will be the last LST version supporting the
old behavior (with some warning however). This will let 4 years to users to
adapt their scripts.

No backport needed.
include/haproxy/cli-t.h
src/cli.c