]> git.kaiwu.me - haproxy.git/commit
MINOR: proxy: extend global tune.defaults.purge for default-server
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 8 Jul 2026 08:30:51 +0000 (10:30 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 3 Aug 2026 14:52:09 +0000 (16:52 +0200)
commit8a72637e06c28953e9eb02156c4ad5dad95128a4
tree16028f3eee547f681f587122e2a2a213d39552e7
parent3f0736468586564cbc15a5b30fb308a2746ef7ef
MINOR: proxy: extend global tune.defaults.purge for default-server

Previous patch changes behavior for default-server. They are now
preserved after configuration during the whole process lifetime as
dynamic servers may need them. A default-server is still purge though if
it does not contain any particular setting.

This relation between dynamic and default-server is similar to the one
between dynamic backends and named default proxies sections, which are
also kept by default at runtime.

This patch extends tune.defaults.purge keyword which was previously used
to force cleanup of named defaults section on post parsing. This now
support an extra argument to instruct the type of elements to remove :
supported values are "proxies" for named defaults sections and "servers"
for default-server.

Without any argument, the option only forces clean up of named defaults
sections. This is the simplest method to preserve backward compatibility
with previous releases.

This new setting requires a dedicated code block for default-server
purgeing in check_config_validity(). This cannot be performed during
post-section parsing as this is a global setting which can be defined
later.
doc/configuration.txt
include/haproxy/global-t.h
src/cfgparse-global.c
src/cfgparse.c