From: Willy Tarreau Date: Fri, 4 Nov 2016 17:21:32 +0000 (+0100) Subject: MEDIUM: cli: leave the RMAINT state when setting an IP address on the CLI X-Git-Tag: v1.7-dev6~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a33ec24683fd2d243aa5ae487f7d201fe7ae0d85;p=thirdparty%2Fhaproxy.git MEDIUM: cli: leave the RMAINT state when setting an IP address on the CLI The RMAINT state happens when a server doesn't get a valid DNS response past the hold time. If the address is forced on the CLI, we must use it and leave the RMAINT state. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index e18b9ba756..491b0fe67f 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -1806,7 +1806,7 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line) char *addr = NULL; char *port = NULL; if (strlen(args[4]) == 0) { - appctx->ctx.cli.msg = "set server / requires an .\n"; + appctx->ctx.cli.msg = "set server / addr requires an address and optionally a port.\n"; appctx->st0 = STAT_CLI_PRINT; return 1; } @@ -1821,6 +1821,7 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line) appctx->ctx.cli.msg = warning; appctx->st0 = STAT_CLI_PRINT; } + srv_clr_admin_flag(sv, SRV_ADMF_RMAINT); } else { appctx->ctx.cli.msg = "'set server ' only supports 'agent', 'health', 'state', 'weight', 'addr' and 'check-port'.\n";