]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cfgparse/stktable: fix error message on stktable_init() failure
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 3 Nov 2023 11:10:56 +0000 (12:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 3 Nov 2023 16:30:30 +0000 (17:30 +0100)
As a result of copy paste error in 1b8e68e ("MEDIUM: stick-table: Stop
handling stick-tables as proxies."), postparsing stktable_init() failures
were reported as such for named peer tables:

   "Proxy 'table_name': failed to initialize stick table."

Now they are correctly reported like this:

   "Parsing [file:line]: failed to initialize 'table_name' stick-table."

This should be backported to every stable versions.

src/cfgparse.c

index 9a28fae550ada8fdb7545cc2802a2cc5fd30325e..d18d7ab0ab8fe4883856b6b473b8298f255f04b5 100644 (file)
@@ -4399,7 +4399,7 @@ init_proxies_list_stage2:
                if (t->proxy)
                        continue;
                if (!stktable_init(t)) {
-                       ha_alert("Proxy '%s': failed to initialize stick-table.\n", t->id);
+                       ha_alert("Parsing [%s:%d]: failed to initialize '%s' stick-table.\n", t->conf.file, t->conf.line, t->id);
                        cfgerr++;
                }
        }