mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: config: only report a warning when stats sockets are bound to more than 1 process
Till now a warning was emitted if the "stats bind-process" was not specified when nbproc was greater than 1. Now we can be much finer and only emit a warning when at least of the stats socket is bound to more than one process at a time.
This commit is contained in:
parent
ae30253c27
commit
67c2abc2f3
@ -6950,8 +6950,22 @@ out_uri_auth_compat:
|
||||
|
||||
/* Check multi-process mode compatibility */
|
||||
if (global.nbproc > 1) {
|
||||
if (global.stats_fe && !global.stats_fe->bind_proc) {
|
||||
Warning("stats socket will not work as expected in multi-process mode (nbproc > 1), you should force process binding using 'stats bind-process'.\n");
|
||||
list_for_each_entry(bind_conf, &global.stats_fe->conf.bind, by_fe) {
|
||||
unsigned long mask;
|
||||
|
||||
mask = nbits(global.nbproc);
|
||||
if (global.stats_fe->bind_proc)
|
||||
mask &= global.stats_fe->bind_proc;
|
||||
|
||||
if (bind_conf->bind_proc)
|
||||
mask &= bind_conf->bind_proc;
|
||||
|
||||
/* stop here if more than one process is used */
|
||||
if (popcount(mask) > 1)
|
||||
break;
|
||||
}
|
||||
if (&bind_conf->by_fe != &global.stats_fe->conf.bind) {
|
||||
Warning("stats socket will not work as expected in multi-process mode (nbproc > 1), you should force process binding globally using 'stats bind-process' or per socket using the 'process' attribute.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user