BUG/MEDIUM: checks: a server passed in maint state was not forced down.

Setting a server in maint mode, the required next_state was not set
before calling the 'lb_down' function and so the system state was never
commited.

This patch should be backported in 1.8
This commit is contained in:
Emeric Brun 2017-12-21 14:42:26 +01:00 committed by Willy Tarreau
parent 7aa15b072e
commit e31148031f

View File

@ -4630,10 +4630,11 @@ void srv_update_status(struct server *s)
else { /* server was still running */
check->health = 0; /* failure */
s->last_change = now.tv_sec;
s->next_state = SRV_ST_STOPPED;
if (s->proxy->lbprm.set_server_status_down)
s->proxy->lbprm.set_server_status_down(s);
s->next_state = SRV_ST_STOPPED;
if (s->onmarkeddown & HANA_ONMARKEDDOWN_SHUTDOWNSESSIONS)
srv_shutdown_streams(s, SF_ERR_DOWN);