]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: spoe: Add SPOE filters in the exposed deprecated directives
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Mar 2024 08:08:08 +0000 (09:08 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Mar 2024 10:31:48 +0000 (11:31 +0100)
It is the first deprecated directive exposed via the
'expose-deprecated-directives' global option. This way, it is possible to
silent the warning about the SPOE uses.

doc/configuration.txt
reg-tests/spoe/wrong_init.vtc
src/flt_spoe.c

index 5b8188d61a0590a2bc7022465e43fb549f1a2eb8..aac245e9543568f68be6944d78059f1699ee0764 100644 (file)
@@ -26625,7 +26625,8 @@ the Stream Processing Offload Protocol (SPOP).
 For all information about the SPOE configuration and the SPOP specification, see
 "doc/SPOE.txt".
 
-WARNING: The SPOE filter is now deprecated.
+WARNING: The SPOE filter is now deprecated. Use 'expose-deprecated-directives'
+         to silent warnings if you must use it.
 
 9.4. Cache
 ----------
index 152622c5e46756d10544ec96b66c95aa5952a558..7fbbfbe64327e3da8233499b53c131d0273d33ee 100644 (file)
@@ -12,6 +12,11 @@ varnishtest "SPOE bug: missing configuration file"
 feature ignore_unknown_macro
 
 haproxy h1 -conf-BAD {} {
+        global
+.if version_atleast(3.0-dev6)
+            expose-deprecated-directives
+.endif
+
        defaults
         timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
         timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
index 5623fec00bbf68fade7e5b8f797c3dea214410fe..0c06bed774e3d3303449b5c11fc34ac8b731111c 100644 (file)
@@ -4106,7 +4106,9 @@ parse_spoe_flt(char **args, int *cur_arg, struct proxy *px,
        curpxopts2 = 0;
 
 
-       ha_warning("Proxy %s: SPOE filter is deprecated and will be removed in future version.\n", px->id);
+       if (!deprecated_directives_allowed)
+               ha_warning("Proxy %s: SPOE filter is deprecated and will be removed in future version. "
+                          "Use 'expose-deprecated-directives' in global section to silent this warning\n", px->id);
 
        conf = calloc(1, sizeof(*conf));
        if (conf == NULL) {