]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REG-TESTS: stickiness: Delay haproxys start to properly resolv variables
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 5 Jun 2023 06:09:40 +0000 (08:09 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 5 Jun 2023 06:24:34 +0000 (08:24 +0200)
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
reg-tests/stickiness/srvkey-addr.vtc

index 81da9c3f676aff93ec341eb09b146141442eb882..23c9a9afd1dc38de54b441ad73a286e077ce8342 100644 (file)
@@ -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"
index 99a4d8b71fe6eead1e89e32f7a190e0fc7165230..0dc1148f9cfefeda0cbb952505377f3a4faa4688 100644 (file)
@@ -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"