From: Cyril Bonté Date: Thu, 14 Dec 2017 15:39:26 +0000 (+0100) Subject: BUG: MAJOR: lb_map: server map calculation broken X-Git-Tag: v1.9-dev1~579 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3906d5739c1c2f24bedeffcd0664190f85896523;p=thirdparty%2Fhaproxy.git BUG: MAJOR: lb_map: server map calculation broken Adrian Williams reported that several balancing methods were broken and sent all requests to one backend. This is a regression in haproxy 1.8 where the server score was not correctly recalculated. This fix must be backported to the 1.8 branch. --- diff --git a/src/lb_map.c b/src/lb_map.c index ecab4de139..a1e1d34927 100644 --- a/src/lb_map.c +++ b/src/lb_map.c @@ -122,7 +122,7 @@ void recalc_server_map(struct proxy *px) } } px->lbprm.map.srv[o] = best; - HA_ATOMIC_ADD(&best->wscore, tot); + HA_ATOMIC_SUB(&best->wscore, tot); } }