From: Willy Tarreau Date: Wed, 21 May 2014 15:13:13 +0000 (+0200) Subject: BUG/MINOR: stats: tracking servers may incorrectly report an inherited DRAIN status X-Git-Tag: v1.5-dev26~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efe282260e40b00f7ec7100d61a79a6d20f244b8;p=thirdparty%2Fhaproxy.git BUG/MINOR: stats: tracking servers may incorrectly report an inherited DRAIN status The DRAIN status is not inherited between tracked servers, so the stats page must only use the reported server's status and not the tracked server's status, otherwise it misleadingly indicates a DRAIN state when a server tracks a draining server, while this is wrong. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 5bfada7a9b..1d9531f1b2 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -3627,7 +3627,7 @@ static int stats_dump_proxy_to_buffer(struct stream_interface *si, struct proxy else sv_state = 2; /* going down */ - if (server_is_draining(svs)) + if (server_is_draining(sv)) sv_state += 4; else if (svs->state & SRV_GOINGDOWN) sv_state += 2;