]> git.kaiwu.me - haproxy.git/commit
REGTESTS: server: test the server settings reported by the runtime
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 03:40:55 +0000 (03:40 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:19:30 +0000 (17:19 +0200)
commit6d1a0c331d176bb28608673e642db67ac4fdfc92
tree2fe275a9b155d56b1d881d86bda26c33e516965f
parent5a059b32c8262966b5bde22e354a9fc0380f9380
REGTESTS: server: test the server settings reported by the runtime

A large part of the "server" keywords had no coverage: addr, port,
agent-addr, agent-port, rise, fall, init-state, minconn, maxqueue,
backup, non-stick, pool-purge-delay, pool-max-conn, pool-low-conn,
max-reuse and the explicit identifiers.

They are all visible through "show servers state", "show stat typed"
and "show servers conn", which makes them checkable without any traffic
and without waiting for a health check to complete. The checks are
directed at a second haproxy instance which accepts the connections and
never answers, so that no check can complete and the initial states
stay observable for the whole test, and the proxies and servers are
given explicit identifiers so that the field names of "show stat typed"
are predictable. Each dump is restricted to a single server because the
full typed dump of nine servers does not fit in one CLI response.

The four documented init-states are checked against the health counter
they set up, as is the fact that a server which says nothing inherits
the default-server value.

Note that "init-state none" is documented as restoring the default
behavior when the setting was inherited from default-server, but it
currently has no effect: srv_set_init_state() returns early for
SRV_INIT_STATE_NONE and therefore does not undo what the inherited
value had already applied. The test matches the current behavior.
reg-tests/server/server_settings.vtc [new file with mode: 0644]