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.
This commit is contained in:
Willy Tarreau 2014-05-21 17:13:13 +02:00
parent 0943757a21
commit efe282260e

View File

@ -3627,7 +3627,7 @@ static int stats_dump_proxy_to_buffer(struct stream_interface *si, struct proxy
else else
sv_state = 2; /* going down */ sv_state = 2; /* going down */
if (server_is_draining(svs)) if (server_is_draining(sv))
sv_state += 4; sv_state += 4;
else if (svs->state & SRV_GOINGDOWN) else if (svs->state & SRV_GOINGDOWN)
sv_state += 2; sv_state += 2;