]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: server: Properly handle init-state value during haproxy startup
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 May 2026 07:25:56 +0000 (09:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 May 2026 15:50:50 +0000 (17:50 +0200)
commit18c5cd6674756f5fd3517016810f0f208e0a8315
tree72022917d45d69575f228506574f991d0490b0ac
parentb786eaf1b16fb0bce96e7f0816385b5e932eb7c3
BUG/MINOR: server: Properly handle init-state value during haproxy startup

Unlike stated in the configuration manual, the server 'init-state' parameter
was not evaluated during haproxy startup/reload. After a review, it appeared
there were also issues if combined with the 'track' parameter. In addtition,
this parameter was only evaluated when health-checks were enabled for the
server, leading to unexpected behavior if the serve settings are dynamically
changed via the CLI.

To fix those issues, behavior of the 'init-state' parameter was slightly
adapted. It is always evaluated, even when there is no running health-checks
for the server. An error is reported if the 'track' parameter is also
defined. Both cannot work together.

In addition, the "none" state was introduced to be able to restore the
default behavior. It will be especially useful when the parameter is
inherited from a 'default-server' directive.

This patch should fix the issue #3298. It must be backported as far as 3.2.
doc/configuration.txt
include/haproxy/server-t.h
include/haproxy/server.h
src/server.c