mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-02 09:30:36 +00:00
MINOR: config: emit a warning when 'default_backend' masks servers
When a "listen" instance uses a "default_backned" rule and has servers, the servers will never be used. Report it so that users don't get trapped.
This commit is contained in:
parent
32d0272394
commit
ff67813f58
@ -5723,6 +5723,13 @@ int check_config_validity()
|
||||
*/
|
||||
target->bind_proc = curproxy->bind_proc ?
|
||||
(target->bind_proc | curproxy->bind_proc) : 0;
|
||||
|
||||
/* Emit a warning if this proxy also has some servers */
|
||||
if (curproxy->srv) {
|
||||
Warning("In proxy '%s', the 'default_backend' rule always has precedence over the servers, which will never be used.\n",
|
||||
curproxy->id);
|
||||
err_code |= ERR_WARN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user