mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-27 14:41:28 +01:00
MEDIUM: config: warn when expose-experimental-directives is used for no reason
If users start to enable expose-experimental-directives for the purpose of testing one specific feature, there are chances that the option remains forever and hides the experimental status of other options. Let's emit a warning if the option appears and is not used. This will remind users that they can now drop it, and help keep configs safe for future upgrades.
This commit is contained in:
parent
80ed9f9dcf
commit
8b7a82cd30
@ -2464,7 +2464,10 @@ expose-experimental-directives
|
|||||||
breaking them but with no guarantee. For these reasons, these features are
|
breaking them but with no guarantee. For these reasons, these features are
|
||||||
not expected to be supported beyond the release of the next LTS release.
|
not expected to be supported beyond the release of the next LTS release.
|
||||||
Users who want to try experimental features are expected to upgrade quickly
|
Users who want to try experimental features are expected to upgrade quickly
|
||||||
to benefit from the improvements made to that feature.
|
to benefit from the improvements made to that feature. In order to know if
|
||||||
|
this directive is still needed, it's easy: if it is enabled without being
|
||||||
|
used by any such feature, a warning will be emitted suggesting to turn it
|
||||||
|
off. So without any warning, it means it's still needed.
|
||||||
|
|
||||||
external-check [preserve-env]
|
external-check [preserve-env]
|
||||||
Allows the use of an external agent to perform health checks. This is
|
Allows the use of an external agent to perform health checks. This is
|
||||||
|
|||||||
@ -4609,6 +4609,14 @@ init_proxies_list_stage2:
|
|||||||
cfgerr += postparser->func();
|
cfgerr += postparser->func();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (experimental_directives_allowed &&
|
||||||
|
!(get_tainted() & TAINTED_CONFIG_EXP_KW_DECLARED)) {
|
||||||
|
ha_warning("Option 'expose-experimental-directives' is set in the global section but is "
|
||||||
|
"no longer used. It is strongly recommended to remove it in order to avoid "
|
||||||
|
"using an experimental directive by accident in the future.\n");
|
||||||
|
err_code |= ERR_WARN;
|
||||||
|
}
|
||||||
|
|
||||||
if (cfgerr > 0)
|
if (cfgerr > 0)
|
||||||
err_code |= ERR_ALERT | ERR_FATAL;
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
out:
|
out:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user