]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: config: properly compute the default number of processes for a proxy
authorWilly Tarreau <w@1wt.eu>
Mon, 4 May 2015 19:57:58 +0000 (21:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 May 2015 19:57:58 +0000 (21:57 +0200)
commite428b08ee72879072897d1bcfa38589b7d1a89a5
tree3f6948e0de719bec340e97b70aeb01cf54864ec6
parent64c5722e051768188754bd4c25a440ecd9103b38
BUG/MEDIUM: config: properly compute the default number of processes for a proxy

Chad Lavoie reported an interesting regression caused by the latest
updates to automatically detect the processes a peers section runs on.
It turns out that if a config has neither nbproc nor a bind-process
statement and depending on the frontend->backend chaining, it is possible
to evade all bind_proc propagations, resulting in assigning only ~0UL (all
processes, which is 32 or 64) without ever restricting it to nbproc. It
was not visible in backends until they started to reference peers sections
which saw themselves with 64 processes at once.

This patch addresses this by replacing all those ~0UL with nbits(nbproc).
That way all "bind-process" settings *default* to the number of processes
defined in nbproc instead of 32 or 64.

This fix could possibly be backported into 1.5, though there is no indication
that this bug could have any effect there.
src/cfgparse.c