MINOR: server: diag for 0 weight server

Output a diagnostic report if a server has been configured with a null
weight.
This commit is contained in:
Amaury Denoyelle 2021-03-30 10:26:27 +02:00
parent c4d47d609a
commit da0e7f61e0

View File

@ -2702,6 +2702,10 @@ 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,
"parsing [%s:%d] : 'server %s' : configured with weight of 0 will never be selected by load balancing algorithms\n",
file, linenum, newsrv->id);
return 0;
out: