]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy: Warn about ambiguous use of named defaults sections
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 12 Oct 2021 16:57:43 +0000 (18:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Oct 2021 12:12:19 +0000 (14:12 +0200)
commitb40542000dcd29057f734baf89226637c0a1ca6f
tree4200aa888f758cda56a26d4815aa0312172b5283
parent37a9e21a3a1dd9be072c8c865813d82ada9c0080
MEDIUM: proxy: Warn about ambiguous use of named defaults sections

It is now possible to designate the defaults section to use by adding a name
of the corresponding defaults section and referencing it in the desired
proxy section. However, this introduces an ambiguity. This named defaults
section may still be implicitly used by other proxies if it is the last one
defined. In this case for instance:

  default common
    ...

  default frt from common
    ...

  default bck from common
    ...

  frontend fe from frt
    ...

  backend be from bck
    ...

  listen stats
    ...

Here, it is not really obvious the last section will use the 'bck' defaults
section. And it is probably not the expected behaviour. To help users to
properly configure their haproxy, a warning is now emitted if a defaults
section is explicitly AND implicitly used. The configuration manual was
updated accordingly.

Because this patch adds a warning, it should probably not be backported to
2.4. However, if is is backported, it depends on commit "MINOR: proxy:
Introduce proxy flags to replace disabled bitfield".
doc/configuration.txt
include/haproxy/proxy-t.h
src/cfgparse-listen.c