From 0900bcbdbb2bf3fd26e3f443e59b9e33d7722be0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 4 Dec 2013 00:05:29 +0100 Subject: [PATCH] BUG/MEDIUM: checks: also update the DRAIN state from the web interface In commit 8c3d0be (MEDIUM: Add DRAIN state and report it on the stats page), the drain state was updated on every weight change except those that can be sent via the web interface. This caused inconsistent state combinations to be reported in the stats depending on the sequence (web then cli vs cli then web). It would seem that a call to set_server_drain_state() from within server_recalc_eweight() would simplify things but that's not completely certain yet. --- src/proto_http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/proto_http.c b/src/proto_http.c index c91b10914..51a43a449 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2934,6 +2934,7 @@ int http_process_req_stat_post(struct stream_interface *si, struct http_txn *txn sv->uweight = 0; server_recalc_eweight(sv); + set_server_drain_state(sv); altered_servers++; total_servers++;