REGTESTS: abortonclose: Fix some race conditions
Depending on the timing, the second client that should be reported as a
client abort during connection attempt ("CC--" termination state) is
sometime logged as a server close ("SC--" termination state) instead. It
happens because sometime the connection failure to the server s1 is detected
by haproxy before the client c2 aborts. There is no retries and the
connection timeout is set to 100ms. So, to work, the client abort must be
performed and detected by haproxy in less than 100ms.
To fix the issue, the c2 client is now routed to a backend with a connection
timeout set to 1 second and 10 retries. It should be large enough to detect
the client aborts (~10s)
In addition, there is another race condition when the script is
started. sometime, server s1 is not stopped when the first client sends its
request. So a barrier was added to be sure it is stopped before starting to
send requests. And we wait to be sure the server is detected as DOWN to
unblock the barrier. It is performed by a dedicated backend with an
healthcheck on the server s1.
This patch should solve issue #1664.
(cherry picked from commit 96816b075511f730522dffc12c20793b7e4ea959)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 26f3405b610f007a305279286cc19399b44222ed)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed