Hey Guys,
I can confirm those issues as well as the proposed fix/workaround to
solve the issue.
I upgraded our "nbproc" setup from 1.7.x to 1.9.6 today and noticed some
missing entries from the stats socket, e.g.:
# echo 'show stat' | socat stdio /run/haproxy.stat|wc -l
1442
Which is correct, while after the upgrade it was indeed showing stats
from a random proc:
# echo 'show stat' | socat stdio /run/haproxy.stat|wc -l
341
etc.
Adding the "process 1" to the "stats socket" line seems to help.
On 2019-04-11 18:24, Willy Tarreau wrote:
Hi Patrick,
On Thu, Apr 11, 2019 at 12:18:14PM -0400, Patrick Hemmer wrote:
With haproxy 1.9.6 the `stats bind-process` directive is not working.
Every
connection to the socket is going to a random process:
Here's a simple reproduction:
Config:
global
nbproc 3
stats socket /tmp/haproxy.sock level admin
stats bind-process 1
Testing:
# for i in {1..5}; do socat - unix:/tmp/haproxy.sock <<< "show
info" |
grep Pid: ; done
Pid: 33371
Pid: 33373
Pid: 33372
Pid: 33373
Pid: 33373
This must be pretty annoying. I don't have memories of anything changed
regarding the bind-process stuff between 1.8 and 1.9 (the threads have
moved a lot however). It could be a side effect of some of these
changes
though.
However I'm seeing that adding "process 1" on the "stats socket" line
itself fixes the problem. I suspect the issue is located in the
propagation
of the frontend's mask to the listener, I'll look at this.
Thanks!
Willy
-Patrick
--
Regards,
Christian Ruppert