BUG/MINOR: cfgparse-listen: fix warning being reported as an alert
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 29 Nov 2023 14:03:25 +0000 (15:03 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 1 Dec 2023 08:09:45 +0000 (09:09 +0100)
commiteec3911e64a1638c31fd55482aec8f8f770d02c8
tree4b0f2499bb69830708cb37158dbbf704930eb975
parent49293dfb650065b88e831f4f53240ded9d9b5093
BUG/MINOR: cfgparse-listen: fix warning being reported as an alert

Since b40542000d ("MEDIUM: proxy: Warn about ambiguous use of named
defaults sections") we introduced a new error to prevent user from
having an ambiguous named default section in the config which is both
inherited explicitly using "from" and implicitly by another proxy due to
the default section being the last one defined.

However, despite the error message being presented as a warning the
err_code, the commit message and the documentation, it is actually
reported as a fatal error because ha_alert() was used in place of
ha_warning().

In this patch we make the code comply with the documentation and the
intended behavior by using ha_warning() to report the error message.

This should be backported up to 2.6.
src/cfgparse-listen.c