mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MINOR: peers: detect and warn on init_addr/resolvers/check/agent-check
Some server keywords are currently silently ignored in the peers section, which is not good because it wastes time on user-side, trying to make something work while it cannot by design. With this patch we at least report a few of them (the most common ones), which are init_addr, resolvers, check, agent-check. Others might follow. This may be backported to 2.5 to encourage some cleaning of bogus configs.
This commit is contained in:
parent
245721b329
commit
824c8c5999
@ -896,6 +896,12 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (curpeers->peers_fe->srv->init_addr_methods || curpeers->peers_fe->srv->resolvers_id ||
|
||||
curpeers->peers_fe->srv->do_check || curpeers->peers_fe->srv->do_agent) {
|
||||
ha_warning("parsing [%s:%d] : '%s %s' : init_addr, resolvers, check and agent are ignored for peers.\n", file, linenum, args[0], args[1]);
|
||||
err_code |= ERR_WARN;
|
||||
}
|
||||
|
||||
/* If the peer address has just been parsed, let's copy it to <newpeer>
|
||||
* and initializes ->proto.
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user