From abaafda4850c64183bb69d6a62675b7405993f4a Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 18 Jul 2024 09:52:46 +0200 Subject: [PATCH] BUG/MINOR: server: Don't warn fallback IP is used during init-addr resolution When a fallback IP address is provided in the list of methods to use to resolve the server address, a warning is emitted if previous methods failed. The aim is to inform this address will be used for the server. However, it is valid use-case. It is the expected behavior. There is no reason to emit a warning. Having a message during HAProxy startup to inform the fallback IP address will be used is probably a good idea. But it should be a notice not a warning. Otherwise, checking the configuration validity will always failed, just like starting HAProxy in zero-warning mode while the option was set on purpose. This patch should fix the issue #2627. It must be backported to all stable versions. --- src/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server.c b/src/server.c index e41c2eb88..05f72fffa 100644 --- a/src/server.c +++ b/src/server.c @@ -4954,8 +4954,8 @@ static int srv_iterate_initaddr(struct server *srv) case SRV_IADDR_IP: _srv_set_inetaddr(srv, &srv->init_addr); if (return_code) { - ha_warning("could not resolve address '%s', falling back to configured address.\n", - name); + ha_notice("could not resolve address '%s', falling back to configured address.\n", + name); } goto out;