From: Aurelien DARRAGON Date: Thu, 22 Jun 2023 14:57:29 +0000 (+0200) Subject: BUG/MINOR: ring: size warning incorrectly reported as fatal error X-Git-Tag: v2.9-dev2~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30ff33bd9b7527fe7434b349ada80e0e3cbab5a0;p=thirdparty%2Fhaproxy.git BUG/MINOR: ring: size warning incorrectly reported as fatal error 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 --- diff --git a/src/sink.c b/src/sink.c index 10b5388639..e114909615 100644 --- a/src/sink.c +++ b/src/sink.c @@ -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; }