From 1e5d1b0b0f54e62b8be7540e62ce7ece89db88a5 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 5 Jun 2023 08:09:40 +0200 Subject: [PATCH] REG-TESTS: stickiness: Delay haproxys start to properly resolv variables Because of the commit 5cb8d7b8f ("BUG/MINOR: peers: Improve detection of config errors in peers sections"), 2 scripts now report errors during startup because some variables are not set and the remote peer server is thus malformed. To perform a peer synchro between 2 haproxys in these scripts, the startup must be delayed to properly resolve addresses. In addidiotn, we must wait (2s) to be sure the connection between peers is properly established. These scripts are now flagged as slow. --- reg-tests/stickiness/lb-services.vtc | 9 ++++++--- reg-tests/stickiness/srvkey-addr.vtc | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/reg-tests/stickiness/lb-services.vtc b/reg-tests/stickiness/lb-services.vtc index 81da9c3f67..23c9a9afd1 100644 --- a/reg-tests/stickiness/lb-services.vtc +++ b/reg-tests/stickiness/lb-services.vtc @@ -1,6 +1,6 @@ vtest "A reg test for stickiness" feature ignore_unknown_macro - +#REGTEST_TYPE=slow # The aim of this test is to check that "stick on" rules # do the job they are supposed to do. @@ -79,7 +79,7 @@ haproxy h1 -arg "-L A" -conf { use_backend be1 if acl_be1 use_backend be2 if acl_be2 bind "fd@${fe}" -} -start +} # h2/be1 servers server s5 { @@ -147,9 +147,12 @@ haproxy h2 -arg "-L B" -conf { use_backend be1 if acl_be1 use_backend be2 if acl_be2 bind "fd@${fe}" -} -start +} +haproxy h1 -start delay 0.2 +haproxy h2 -start +delay 2 client cx -connect ${h1_fe_sock} { txreq -url "/be1?client=c1" diff --git a/reg-tests/stickiness/srvkey-addr.vtc b/reg-tests/stickiness/srvkey-addr.vtc index 99a4d8b71f..0dc1148f9c 100644 --- a/reg-tests/stickiness/srvkey-addr.vtc +++ b/reg-tests/stickiness/srvkey-addr.vtc @@ -1,6 +1,6 @@ vtest "A reg test for stickiness with srvkey addr" feature ignore_unknown_macro - +#REGTEST_TYPE=slow # The aim of this test is to check that "stick on" rules # do the job they are supposed to do. @@ -71,7 +71,7 @@ haproxy h1 -arg "-L A" -conf { use_backend be1 if acl_be1 use_backend be2 if acl_be2 bind "fd@${fe}" -} -start +} haproxy h2 -arg "-L B" -conf { defaults @@ -118,9 +118,12 @@ haproxy h2 -arg "-L B" -conf { use_backend be1 if acl_be1 use_backend be2 if acl_be2 bind "fd@${fe}" -} -start +} +haproxy h1 -start delay 0.2 +haproxy h2 -start +delay 2 client cx -connect ${h1_fe_sock} { txreq -url "/be1?client=c1"