mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: cli/wait: rename the condition "srv-unused" to "srv-removable"
As previously discussed, "srv-unused" is sufficiently ambiguous to cause some trouble over the long term. Better use "srv-removable" to indicate that the server is removable, and if the conditions to delete a server change over time, the wait condition will be adjusted without renaming it.
This commit is contained in:
parent
1db3a390bb
commit
b957e741b0
@ -4032,13 +4032,13 @@ wait { -h | <delay> } [<condition> [<args>...]]
|
|||||||
specified condition to be satisfied, to unrecoverably fail, or to remain
|
specified condition to be satisfied, to unrecoverably fail, or to remain
|
||||||
unsatisfied for the whole <delay> duration. The supported conditions are:
|
unsatisfied for the whole <delay> duration. The supported conditions are:
|
||||||
|
|
||||||
- srv-unused <proxy>/<server> : this will wait for the specified server to be
|
- srv-removable <proxy>/<server> : this will wait for the specified server to
|
||||||
removable, i.e. be in maintenance and no longer have any connection on it.
|
be removable, i.e. be in maintenance and no longer have any connection on
|
||||||
Some conditions will never be accepted (e.g. not in maintenance) and will
|
it. Some conditions will never be accepted (e.g. not in maintenance) and
|
||||||
cause the report of a specific error message indicating what condition is
|
will cause the report of a specific error message indicating what condition
|
||||||
not met. The server might even have been removed in parallel and no longer
|
is not met. The server might even have been removed in parallel and no
|
||||||
exit. If everything is OK before the delay, a success is returned and the
|
longer exit. If everything is OK before the delay, a success is returned
|
||||||
operation is terminated.
|
and the operation is terminated.
|
||||||
|
|
||||||
The default unit for the delay is milliseconds, though other units are
|
The default unit for the delay is milliseconds, though other units are
|
||||||
accepted if suffixed with the usual timer units (us, ms, s, m, h, d). When
|
accepted if suffixed with the usual timer units (us, ms, s, m, h, d). When
|
||||||
@ -4051,7 +4051,7 @@ wait { -h | <delay> } [<condition> [<args>...]]
|
|||||||
$ socat -t5 /path/to/socket - <<< "
|
$ socat -t5 /path/to/socket - <<< "
|
||||||
disable server px/srv1
|
disable server px/srv1
|
||||||
shutdown sessions server px/srv1
|
shutdown sessions server px/srv1
|
||||||
wait 2s srv-unused px/srv1
|
wait 2s srv-removable px/srv1
|
||||||
del server px/srv1"
|
del server px/srv1"
|
||||||
|
|
||||||
|
|
||||||
|
@ -2045,7 +2045,7 @@ static int cli_parse_wait(char **args, char *payload, struct appctx *appctx, voi
|
|||||||
return cli_err(appctx, "Invalid duration.\n");
|
return cli_err(appctx, "Invalid duration.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(args[2], "srv-unused") == 0) {
|
if (strcmp(args[2], "srv-removable") == 0) {
|
||||||
struct ist be_name, sv_name;
|
struct ist be_name, sv_name;
|
||||||
|
|
||||||
if (!*args[3])
|
if (!*args[3])
|
||||||
@ -2077,7 +2077,7 @@ static int cli_parse_wait(char **args, char *payload, struct appctx *appctx, voi
|
|||||||
" - <condition> indicates what to wait for, no longer than the specified\n"
|
" - <condition> indicates what to wait for, no longer than the specified\n"
|
||||||
" duration. Supported conditions are:\n"
|
" duration. Supported conditions are:\n"
|
||||||
" - <none> : by default, just sleep for the specified duration.\n"
|
" - <none> : by default, just sleep for the specified duration.\n"
|
||||||
" - srv-unused <px>/<sv> : wait for this server to become unused.\n"
|
" - srv-removable <px>/<sv> : wait for this server to become removable.\n"
|
||||||
"";
|
"";
|
||||||
|
|
||||||
if (strcmp(args[2], "-h") == 0)
|
if (strcmp(args[2], "-h") == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user