]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ring: size warning incorrectly reported as fatal error
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 22 Jun 2023 14:57:29 +0000 (16:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jul 2023 16:28:08 +0000 (18:28 +0200)
When a ring section defines its size using the "size" directive with a
smaller size than the default one or smaller than the previous one,
a warning is generated to inform the user that the new size will be
ignored.

However the err_code is returned as FATAL, so this cause haproxy to
incorrectly abort the init sequence.

Changing the err_code to ERR_WARN so that this warning doesn't refrain
from successfully starting the process.

This should be backported as far as 2.4

src/sink.c

index 10b53886399742e9f974c375bd6faeeeb88f8ffc..e1149096156f903d12ca79b7c10b7c677c213232 100644 (file)
@@ -845,7 +845,7 @@ int cfg_parse_ring(const char *file, int linenum, char **args, int kwm)
                if (size < cfg_sink->ctx.ring->buf.size) {
                        ha_warning("parsing [%s:%d] : ignoring new size '%llu' that is smaller than current size '%llu' for ring '%s'.\n",
                                   file, linenum, (ullong)size, (ullong)cfg_sink->ctx.ring->buf.size, cfg_sink->name);
-                       err_code |= ERR_ALERT | ERR_FATAL;
+                       err_code |= ERR_WARN;
                        goto err;
                }