mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-10 21:38:16 +00:00
BUG/MINOR: server: Don't warn on server resolution failure with init-addr none
During startup, when the "none" method for "init-addr" is evaluated, a warning is emitted if a resolution failure was previously encountered. The documentation of the "none" method states it should be used to ignore server resolution failures and let the server starts in DOWN state. However, because a warning may be emitted, it is not possible to start HAProxy with "zero-warning" option. The same is true when "-dr" command line option is used. It is counter intuitive and, in a way, this contradict what is specified in the documentation. So instead, a notice message is now emitted. At the end, if "-dr" command line option is used or if "none" method is explicitly used, it means the admin is agree with server resolution failures. There is no reason to emit a warning. This patch should fix the issue #2176. It could be backported to all stable versions but backporting to 2.8 is probably enough for now.
This commit is contained in:
parent
6ecabb3f35
commit
e2e72e578e
@ -4085,8 +4085,8 @@ static int srv_iterate_initaddr(struct server *srv)
|
||||
case SRV_IADDR_NONE:
|
||||
srv_set_admin_flag(srv, SRV_ADMF_RMAINT, SRV_ADM_STCHGC_NONE);
|
||||
if (return_code) {
|
||||
ha_warning("could not resolve address '%s', disabling server.\n",
|
||||
name);
|
||||
ha_notice("could not resolve address '%s', disabling server.\n",
|
||||
name);
|
||||
}
|
||||
return return_code;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user