]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cli: display failure reason on wait command
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 19 Aug 2025 15:20:51 +0000 (17:20 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 Aug 2025 12:52:29 +0000 (14:52 +0200)
commitbce29bc7a491e26f73b412e328c38f9f21adcb61
tree44532b8f12722ffbce2a937127b3f2a1758fff6d
parent04f05f188058e8931f203efc44f72a009bc85c0f
MINOR: cli: display failure reason on wait command

wait CLI command can be used to wait until either a defined timeout or a
specific condition is reached. So far, srv-removable is the only event
supported. This is tested via srv_check_for_deletion().

This is implemented via srv_check_for_deletion(), which is
able to report a message describing the reason if the condition is
unmet.

Previously, wait return a generic string, to specify if the condition is
met, the timer has expired or an immediate error is encountered. In case
of srv-removable, it did not report the real reason why a server could
not be removed.

This patch improves wait command with srv-removable. It now displays the
last message returned by srv_check_for_deletion(), either on immediate
error or on timeout. This is implemented by using dynamic string output
with cli_dynmsg/dynerr() functions.
src/cli.c