]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: server: unmark deprecated on enable health/agent cli
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 3 Aug 2021 16:05:37 +0000 (18:05 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 6 Aug 2021 08:09:50 +0000 (10:09 +0200)
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.

src/server.c

index c2c27a15ba50f14f77be8614c26f110bf956b5ed..54f34d0aced6c7da6ca33ddaea76875f77f851e0 100644 (file)
@@ -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 <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 },