From: Willy Tarreau Date: Tue, 3 Dec 2013 23:05:29 +0000 (+0100) Subject: BUG/MEDIUM: checks: also update the DRAIN state from the web interface X-Git-Tag: v1.5-dev20~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0900bcbdbb2bf3fd26e3f443e59b9e33d7722be0;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/proto_http.c b/src/proto_http.c index c91b109142..51a43a4493 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++;