]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: server: reject enabled for dynamic server
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Mar 2024 16:40:16 +0000 (17:40 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 Mar 2024 10:51:05 +0000 (11:51 +0100)
commit250c19032f030a81dca01541e3c2947d117a041c
treed69e9101561cad050da61c53d4b3128963741f6b
parent28dcb7bb64db0f0a6a4d44f1d599c9d24dd79fc6
BUG/MINOR: server: reject enabled for dynamic server

Since their first implementation, dynamic servers are created into
maintenance state. This has been done purposely to avoid immediate
activation of a newly inserted server.

However, this principle is incompatible if "enabled" keyword is used on
"add server". The newly created instance will be unreacheable as proxy
load-balancing algorithm is not informed of its presence via
srv_lb_propagate(). The new server could be unblocked by toggling its
state with "disable server" / "enable server" commands, which will
trigger srv_lb_propagate() invocation.

To avoid this unexpected state, simply forbid "enabled" keyword for
dynamic servers. In the long-term, it could be possible to re authorize
it but at least this requires to call srv_lb_propagate() on dynamic
server creation.

This should fix github issue #2497.

This patch should not be backported as-is, to avoid breaking dynamic
servers API on stable versions. "enabled" should instead be ignored for
them. This will be implemented in a dedicated patch on top of 2.9.
doc/management.txt
src/server.c