BUG/MINOR: cfgparse/stktable: fix error message on stktable_init() failure
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.
(cherry picked from commit b6a9eca88d49226ddae87dd88aef83d389e5d62b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0048daa4f0c939ebd1000efab5defbfacba9f07c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 57ecff32da14e1f9e7869e5d22eb6254ee642c97)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c86f1bfa86a1b5fafddb9b153c78ca942510a951)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 01014c0..d210b84 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -4406,7 +4406,7 @@
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++;
}
}