mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
BUG/MINOR: stktable: report the current proxy name in error messages
Since commit 1b8e68e89a ("MEDIUM: stick-table: Stop handling stick-tables as proxies."), a rule referencing the current proxy with no table leads to the following error : [ALERT] 023/071924 (16479) : Proxy 'px': unable to find stick-table '(null)'. [ALERT] 023/071914 (16479) : Fatal errors found in configuration. for a config like this one: backend px stick on src This patch fixes it and should be backported as far as 2.0.
This commit is contained in:
parent
f22758d12a
commit
508d232a06
@ -2728,7 +2728,7 @@ int check_config_validity()
|
|||||||
|
|
||||||
if (!target) {
|
if (!target) {
|
||||||
ha_alert("Proxy '%s': unable to find stick-table '%s'.\n",
|
ha_alert("Proxy '%s': unable to find stick-table '%s'.\n",
|
||||||
curproxy->id, mrule->table.name);
|
curproxy->id, mrule->table.name ? mrule->table.name : curproxy->id);
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
}
|
}
|
||||||
else if (!stktable_compatible_sample(mrule->expr, target->type)) {
|
else if (!stktable_compatible_sample(mrule->expr, target->type)) {
|
||||||
@ -2766,7 +2766,7 @@ int check_config_validity()
|
|||||||
|
|
||||||
if (!target) {
|
if (!target) {
|
||||||
ha_alert("Proxy '%s': unable to find store table '%s'.\n",
|
ha_alert("Proxy '%s': unable to find store table '%s'.\n",
|
||||||
curproxy->id, mrule->table.name);
|
curproxy->id, mrule->table.name ? mrule->table.name : curproxy->id);
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
}
|
}
|
||||||
else if (!stktable_compatible_sample(mrule->expr, target->type)) {
|
else if (!stktable_compatible_sample(mrule->expr, target->type)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user