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
  2c04eda8b5
  REORG: cli: move "{enable|disable} health" to server.c

and
  58d9cb7d22
  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.
This commit is contained in:
Amaury Denoyelle 2021-08-03 18:05:37 +02:00
parent d7da3dd928
commit c755efd5c6

View File

@ -4747,11 +4747,11 @@ static int cli_parse_delete_server(char **args, char *payload, struct appctx *ap
/* 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 <bk>/<srv> : change a server's maxconn setting", cli_parse_set_maxconn_server, NULL },
{ { "set", "server", NULL }, "set server <bk>/<srv> [opts] : change a server's state, weight, address or ssl", cli_parse_set_server },