REGTESTS: Send valid URIs in peers reg-tests and fix HA config to avoid warnings

Absolute path must be used, otherwise, the requests are rejected by HAProxy
because of the recent changes. In addition, the configuration has been slightly
updated to remove warnings at startup.
This commit is contained in:
Christopher Faulet 2019-10-14 16:10:52 +02:00
parent 531b83e039
commit 1448d3a157
4 changed files with 42 additions and 28 deletions

View File

@ -21,12 +21,14 @@ haproxy h1 -arg "-L A" -conf {
frontend fe frontend fe
bind "fd@${fe}" bind "fd@${fe}"
tcp-request inspect-delay 100ms
tcp-request content track-sc0 url table stkt tcp-request content track-sc0 url table stkt
tcp-request content sc-inc-gpc0(0) tcp-request content sc-inc-gpc0(0)
} }
haproxy h2 -arg "-L B" -conf { haproxy h2 -arg "-L B" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -48,6 +50,7 @@ haproxy h2 -arg "-L B" -conf {
haproxy h3 -arg "-L C" -conf { haproxy h3 -arg "-L C" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -68,22 +71,22 @@ haproxy h3 -arg "-L C" -conf {
} }
client c1 -connect ${h1_fe_sock} { client c1 -connect ${h1_fe_sock} {
txreq -url "c1_client" txreq -url "/c1_client"
expect_close expect_close
} -start } -start
client c2 -connect ${h1_fe_sock} { client c2 -connect ${h1_fe_sock} {
txreq -url "c2_client" txreq -url "/c2_client"
expect_close expect_close
} -start } -start
client c3 -connect ${h1_fe_sock} { client c3 -connect ${h1_fe_sock} {
txreq -url "c3_client" txreq -url "/c3_client"
expect_close expect_close
} -start } -start
client c4 -connect ${h1_fe_sock} { client c4 -connect ${h1_fe_sock} {
txreq -url "c4_client" txreq -url "/c4_client"
expect_close expect_close
} -start } -start
@ -103,16 +106,16 @@ delay 2
haproxy h1 -cli { haproxy h1 -cli {
send "show table stkt" send "show table stkt"
expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h2 -cli { haproxy h2 -cli {
send "show table stkt" send "show table stkt"
expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h3 -cli { haproxy h3 -cli {
send "show table stkt" send "show table stkt"
expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }

View File

@ -20,12 +20,14 @@ haproxy h1 -arg "-L A" -conf {
frontend fe frontend fe
bind "fd@${fe}" bind "fd@${fe}"
tcp-request inspect-delay 100ms
tcp-request content track-sc0 url table peers/stkt tcp-request content track-sc0 url table peers/stkt
tcp-request content sc-inc-gpc0(0) tcp-request content sc-inc-gpc0(0)
} }
haproxy h2 -arg "-L B" -conf { haproxy h2 -arg "-L B" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -45,6 +47,7 @@ haproxy h2 -arg "-L B" -conf {
haproxy h3 -arg "-L C" -conf { haproxy h3 -arg "-L C" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -63,22 +66,22 @@ haproxy h3 -arg "-L C" -conf {
} }
client c1 -connect ${h1_fe_sock} { client c1 -connect ${h1_fe_sock} {
txreq -url "c1_client" txreq -url "/c1_client"
expect_close expect_close
} -start } -start
client c2 -connect ${h1_fe_sock} { client c2 -connect ${h1_fe_sock} {
txreq -url "c2_client" txreq -url "/c2_client"
expect_close expect_close
} -start } -start
client c3 -connect ${h1_fe_sock} { client c3 -connect ${h1_fe_sock} {
txreq -url "c3_client" txreq -url "/c3_client"
expect_close expect_close
} -start } -start
client c4 -connect ${h1_fe_sock} { client c4 -connect ${h1_fe_sock} {
txreq -url "c4_client" txreq -url "/c4_client"
expect_close expect_close
} -start } -start
@ -98,16 +101,16 @@ delay 2
haproxy h1 -cli { haproxy h1 -cli {
send "show table peers/stkt" send "show table peers/stkt"
expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h2 -cli { haproxy h2 -cli {
send "show table peers/stkt" send "show table peers/stkt"
expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h3 -cli { haproxy h3 -cli {
send "show table peers/stkt" send "show table peers/stkt"
expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }

View File

@ -24,12 +24,14 @@ haproxy h1 -arg "-L A" -conf {
frontend fe frontend fe
bind "fd@${fe}" bind "fd@${fe}"
tcp-request inspect-delay 100ms
tcp-request content track-sc0 url table stkt tcp-request content track-sc0 url table stkt
tcp-request content sc-inc-gpc0(0) tcp-request content sc-inc-gpc0(0)
} }
haproxy h2 -arg "-L B" -conf { haproxy h2 -arg "-L B" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -53,6 +55,7 @@ haproxy h2 -arg "-L B" -conf {
haproxy h3 -arg "-L C" -conf { haproxy h3 -arg "-L C" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -76,6 +79,7 @@ haproxy h3 -arg "-L C" -conf {
haproxy h4 -arg "-L D" -conf { haproxy h4 -arg "-L D" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -97,22 +101,22 @@ haproxy h4 -arg "-L D" -conf {
} }
client c1 -connect ${h1_fe_sock} { client c1 -connect ${h1_fe_sock} {
txreq -url "c1_client" txreq -url "/c1_client"
expect_close expect_close
} -start } -start
client c2 -connect ${h1_fe_sock} { client c2 -connect ${h1_fe_sock} {
txreq -url "c2_client" txreq -url "/c2_client"
expect_close expect_close
} -start } -start
client c3 -connect ${h1_fe_sock} { client c3 -connect ${h1_fe_sock} {
txreq -url "c3_client" txreq -url "/c3_client"
expect_close expect_close
} -start } -start
client c4 -connect ${h1_fe_sock} { client c4 -connect ${h1_fe_sock} {
txreq -url "c4_client" txreq -url "/c4_client"
expect_close expect_close
} -start } -start
@ -134,17 +138,17 @@ delay 2
haproxy h1 -cli { haproxy h1 -cli {
send "show table stkt" send "show table stkt"
expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h2 -cli { haproxy h2 -cli {
send "show table stkt" send "show table stkt"
expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h3 -cli { haproxy h3 -cli {
send "show table stkt" send "show table stkt"
expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h4 -cli { haproxy h4 -cli {

View File

@ -22,12 +22,14 @@ haproxy h1 -arg "-L A" -conf {
frontend fe frontend fe
bind "fd@${fe}" bind "fd@${fe}"
tcp-request inspect-delay 100ms
tcp-request content track-sc0 url table peers/stkt tcp-request content track-sc0 url table peers/stkt
tcp-request content sc-inc-gpc0(0) tcp-request content sc-inc-gpc0(0)
} }
haproxy h2 -arg "-L B" -conf { haproxy h2 -arg "-L B" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -49,6 +51,7 @@ haproxy h2 -arg "-L B" -conf {
haproxy h3 -arg "-L C" -conf { haproxy h3 -arg "-L C" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -70,6 +73,7 @@ haproxy h3 -arg "-L C" -conf {
haproxy h4 -arg "-L D" -conf { haproxy h4 -arg "-L D" -conf {
defaults defaults
mode http
timeout client 1s timeout client 1s
timeout connect 1s timeout connect 1s
timeout server 1s timeout server 1s
@ -91,22 +95,22 @@ haproxy h4 -arg "-L D" -conf {
} }
client c1 -connect ${h1_fe_sock} { client c1 -connect ${h1_fe_sock} {
txreq -url "c1_client" txreq -url "/c1_client"
expect_close expect_close
} -start } -start
client c2 -connect ${h1_fe_sock} { client c2 -connect ${h1_fe_sock} {
txreq -url "c2_client" txreq -url "/c2_client"
expect_close expect_close
} -start } -start
client c3 -connect ${h1_fe_sock} { client c3 -connect ${h1_fe_sock} {
txreq -url "c3_client" txreq -url "/c3_client"
expect_close expect_close
} -start } -start
client c4 -connect ${h1_fe_sock} { client c4 -connect ${h1_fe_sock} {
txreq -url "c4_client" txreq -url "/c4_client"
expect_close expect_close
} -start } -start
@ -128,17 +132,17 @@ delay 2
haproxy h1 -cli { haproxy h1 -cli {
send "show table peers/stkt" send "show table peers/stkt"
expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h2 -cli { haproxy h2 -cli {
send "show table peers/stkt" send "show table peers/stkt"
expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h3 -cli { haproxy h3 -cli {
send "show table peers/stkt" send "show table peers/stkt"
expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}" expect ~ "# table: peers/stkt, type: string, size:1048[0-9]{4}, used:4(\n0x[0-9a-f]*: key=/c[1-4]_client use=0 exp=0 server_id=0 gpc0=1 conn_rate\\(50000\\)=1 conn_cur=0){4}"
} }
haproxy h4 -cli { haproxy h4 -cli {