There are some similarities between a weight of zero and the administratively set drain state: both allow existing connections to continue while not accepting any new ones.
However, when reporting a server state generally a distinction is made between state=UP,weight=0 and state=DRAIN,weight=*. This patch makes stats reporting consistent in this regard. Signed-off-by: Simon Horman <[email protected]> --- src/dumpstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index d82ce8538841..9f5a4349d231 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -3874,7 +3874,7 @@ static int stats_dump_proxy_to_buffer(struct stream_interface *si, struct proxy else sv_state = 4; - if (server_is_draining(sv)) + if (sv->admin & SRV_ADMF_DRAIN) sv_state += 4; if (sv_state == 4 && !(svs->check.state & CHK_ST_ENABLED)) -- 2.1.4

