From efe282260e40b00f7ec7100d61a79a6d20f244b8 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 21 May 2014 17:13:13 +0200 Subject: [PATCH] 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. --- src/dumpstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index 5bfada7a9..1d9531f1b 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;