]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: checks: also update the DRAIN state from the web interface
authorWilly Tarreau <w@1wt.eu>
Tue, 3 Dec 2013 23:05:29 +0000 (00:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Dec 2013 23:54:18 +0000 (00:54 +0100)
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

index c91b109142b914d1d54d94f99ab3f5cc54f4e8c4..51a43a4493b3bb3b4365eb23bccaa362e2706a96 100644 (file)
@@ -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++;