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.
This commit is contained in:
Christopher Faulet 2023-06-05 08:09:40 +02:00
parent 2c29d1f524
commit 1e5d1b0b0f
2 changed files with 12 additions and 6 deletions

View 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"

View 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"