From: Amaury Denoyelle Date: Tue, 3 Aug 2021 16:05:37 +0000 (+0200) Subject: MINOR: server: unmark deprecated on enable health/agent cli X-Git-Tag: v2.5-dev4~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c755efd5c64ad7327a6b763ea8025a820c5ca374;p=thirdparty%2Fhaproxy.git MINOR: server: unmark deprecated on enable health/agent cli Remove the "DEPRECATED" marker on "enable/disable health/agent" commands. Their purpose is to toggle the check/agent on a server. These commands are still useful because their purpose is not covered by the "set server" command. Most there was confusion with the commands 'set server health/agent', which in fact serves another goal. Note that the indication "use 'set server' instead" has been added since 2016 on the commit 2c04eda8b58636ad2ae44e42b1f50f3b5a24a642 REORG: cli: move "{enable|disable} health" to server.c and 58d9cb7d22c1b0d8239543443131e3e3658375d0 REORG: cli: move "{enable|disable} agent" to server.c Besides, these commands will become required to enable check/agent on dynamic servers which will be created with check disabled. This should be backported up to 2.4. --- diff --git a/src/server.c b/src/server.c index c2c27a15ba..54f34d0ace 100644 --- a/src/server.c +++ b/src/server.c @@ -4747,11 +4747,11 @@ out: /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "disable", "agent", NULL }, "disable agent (DEPRECATED) : disable agent checks (use 'set server' instead)", cli_parse_disable_agent, NULL }, - { { "disable", "health", NULL }, "disable health (DEPRECATED) : disable health checks (use 'set server' instead)", cli_parse_disable_health, NULL }, + { { "disable", "agent", NULL }, "disable agent : disable agent checks", cli_parse_disable_agent, NULL }, + { { "disable", "health", NULL }, "disable health : disable health checks", cli_parse_disable_health, NULL }, { { "disable", "server", NULL }, "disable server (DEPRECATED) : disable a server for maintenance (use 'set server' instead)", cli_parse_disable_server, NULL }, - { { "enable", "agent", NULL }, "enable agent (DEPRECATED) : enable agent checks (use 'set server' instead)", cli_parse_enable_agent, NULL }, - { { "enable", "health", NULL }, "enable health (DEPRECATED) : enable health checks (use 'set server' instead)", cli_parse_enable_health, NULL }, + { { "enable", "agent", NULL }, "enable agent : enable agent checks", cli_parse_enable_agent, NULL }, + { { "enable", "health", NULL }, "enable health : enable health checks", cli_parse_enable_health, NULL }, { { "enable", "server", NULL }, "enable server (DEPRECATED) : enable a disabled server (use 'set server' instead)", cli_parse_enable_server, NULL }, { { "set", "maxconn", "server", NULL }, "set maxconn server / : change a server's maxconn setting", cli_parse_set_maxconn_server, NULL }, { { "set", "server", NULL }, "set server / [opts] : change a server's state, weight, address or ssl", cli_parse_set_server },