mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
When threads are enabled and running on a machine with multiple CCX or multiple nodes, thread groups are now enabled since 3.3-dev2, causing load-balancing algorithms to randomly fail due to incoming connections spreading over multiple groups and using different load balancing indexes. Let's just force "thread-groups 1" into all configs when threads are enabled to avoid this.
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
varnishtest "Test acl() sample fetch"
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.9-dev2)'"
|
|
|
|
feature ignore_unknown_macro
|
|
|
|
haproxy h1 -conf {
|
|
global
|
|
.if feature(THREAD)
|
|
thread-groups 1
|
|
.endif
|
|
|
|
defaults
|
|
mode http
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
frontend fe1
|
|
bind "fd@${fe1}"
|
|
|
|
acl ACL1 always_true
|
|
acl ACL2 acl(ACL1)
|
|
acl ACL3 acl(!ACL2)
|
|
acl ACL4 acl(ACL2,!ACL3)
|
|
|
|
http-request return status 200 hdr x-acl "ACL1=%[acl(ACL1)] ACL2=%[acl(ACL2)] ACL3=%[acl(ACL3)] ACL4=%[acl(ACL4)] TRUE=%[acl(TRUE)]"
|
|
} -start
|
|
|
|
client c1 -connect ${h1_fe1_sock} {
|
|
txreq -req GET -url /
|
|
rxresp
|
|
expect resp.status == 200
|
|
expect resp.http.x-acl ~ "ACL1=1"
|
|
expect resp.http.x-acl ~ "ACL2=1"
|
|
expect resp.http.x-acl ~ "ACL3=0"
|
|
expect resp.http.x-acl ~ "ACL4=1"
|
|
expect resp.http.x-acl ~ "TRUE=1"
|
|
} -run
|