mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
This reverts commit 266b1a8 ("MEDIUM: server: Inherit CLI weight changes and agent-check weight responses") from Michal Idzikowski, which is still broken. It stops propagating weights at the first error encountered, leaving servers in a random state depending on what LB algorithms are used on other servers tracking the one experiencing the weight change. It's unsure what the best way to address this is, but we cannot leave the servers in an inconsistent state between farms. For example : backend site1 mode http balance uri hash-type consistent server s1 127.0.0.1:8001 weight 10 track servers/s1 backend site2 mode http balance uri server s1 127.0.0.1:8001 weight 10 track servers/s1 backend site3 mode http balance uri hash-type consistent server s1 127.0.0.1:8001 weight 10 track servers/s1 backend servers server s1 127.0.0.1:8001 weight 10 check inter 1s The weight change is applied on "servers/s1". It tries to propagate to the servers tracking it, which are site1/s1, site2/s1 and site3/s1. Let's say that "weight 50%" is requested. The servers are linked in reverse-order, so the change is applied to "servers/s1", then to "site3/s1", then to "site2/s1" and this one fails and rejects the change. The change is aborted and never propagated to "site1/s1", which keeps the server in a different state from "site3/s1". At the very least, in case of error, the changes should probably be unrolled. Also the error reported on the CLI (when changing from the CLI) simply says : Backend is using a static LB algorithm and only accepts weights '0%' and '100%'. Without more indications what the faulty backend is. Let's revert this change for now, as initially feared it will definitely cause more harm than good and at least needs to be revisited. It was never backported to any stable branch so no backport is needed.