From: Amaury Denoyelle Date: Fri, 7 May 2021 13:13:51 +0000 (+0200) Subject: BUG/MINOR: server: do not report diag for peer servers with null weight X-Git-Tag: v2.4-dev19~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24abb0cdc11c355f3e4ad7e17c5178501e69eee8;p=thirdparty%2Fhaproxy.git BUG/MINOR: server: do not report diag for peer servers with null weight Only check servers attached to a proxy with PR_CAP_LB. This does not need to be backported as the diag message was added in the current 2.4-dev branch. --- diff --git a/src/server.c b/src/server.c index 9b83ff8fe9..75977d8c77 100644 --- a/src/server.c +++ b/src/server.c @@ -2703,7 +2703,7 @@ int parse_server(const char *file, int linenum, char **args, if (parse_flags & SRV_PARSE_TEMPLATE) _srv_parse_tmpl_init(newsrv, curproxy); - HA_DIAG_WARNING_COND(!newsrv->uweight, + HA_DIAG_WARNING_COND((curproxy->cap & PR_CAP_LB) && !newsrv->uweight, "parsing [%s:%d] : 'server %s' : configured with weight of 0 will never be selected by load balancing algorithms\n", file, linenum, newsrv->id);