mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
MEDIUM: resolvers: continue startup if network is unavailable
When haproxy starts with a resolver section, and there is a default one since 2.6 which use /etc/resolv.conf, it tries to do a connect() with the UDP socket in order to check if the routes of the system allows to reach the server. This check is too much restrictive as it won't prevent any runtime failure. Relax the check by making it a warning instead of a fatal alert. This must be backported in 2.6.
This commit is contained in:
parent
dc66f2f97d
commit
c31577f32e
@ -2509,10 +2509,10 @@ static int resolvers_finalize_config(void)
|
||||
continue;
|
||||
}
|
||||
if (connect(fd, (struct sockaddr*)&ns->dgram->conn.addr.to, get_addr_len(&ns->dgram->conn.addr.to)) == -1) {
|
||||
ha_alert("resolvers '%s': can't connect socket for nameserver '%s'.\n",
|
||||
ha_warning("resolvers '%s': can't connect socket for nameserver '%s'.\n",
|
||||
resolvers->id, ns->id);
|
||||
close(fd);
|
||||
err_code |= (ERR_ALERT|ERR_ABORT);
|
||||
err_code |= ERR_WARN;
|
||||
continue;
|
||||
}
|
||||
close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user