]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: check: consitent way to set agentaddr
authorWilliam Dauchy <wdauchy@gmail.com>
Wed, 3 Feb 2021 21:30:08 +0000 (22:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Feb 2021 12:55:04 +0000 (13:55 +0100)
commit1c921cd748d8c7f69b45453bb74f3445de24c0e2
tree37b41dea29b9ff7b921fb596bf24ae8585251495
parentfe03e7d0457daa82e1ec5cb7e70c3a3f28ed0fc7
BUG/MINOR: check: consitent way to set agentaddr

small consistency problem with `addr` and `agent-addr` options:
for the both options, the last one parsed is always used to set the
agent-check addr.  Thus these two lines don't have the same behavior:

  server ... addr <addr1> agent-addr <addr2>
  server ... agent-addr <addr2> addr <addr1>

After this patch `agent-addr` will always be the priority option over
`addr`. It means we test the flag before setting agentaddr.
We also fix all the places where we did not set the flag to be coherent
everywhere.

I was not really able to determine where this issue is coming from. So
it is probable we may backport it to all stable version where the agent
is supported.

Signed-off-by: William Dauchy <wdauchy@gmail.com>
include/haproxy/check.h
src/check.c
src/server.c