blob: 686a5c5005f810acbe33d8989ade8034d9fbf7c3 [file] [log] [blame]
William Lallemand8cf30b32022-12-13 17:17:17 +01001#REGTEST_TYPE=broken
2#REQUIRE_VERSION=2.2
3#REQUIRE_OPTION=OPENSSL
4
5# Check the maxconn computation with the -m parameter
6# Broken because it can't work with ASAN.
7
8varnishtest "Automatic maxconn computation"
9
10
11feature ignore_unknown_macro
12
13server s1 {
14 rxreq
15 txresp
16} -start
17
18
19haproxy h1 -arg "-m 1024" -conf {
20} -start
21
22haproxy h1 -cli {
23 send "show info"
24 expect ~ ".*Maxconn: 29000\n.*"
25}
26
27haproxy h2 -arg "-m 384" -conf {
28} -start
29
30haproxy h2 -cli {
31 send "show info"
32 expect ~ ".*Maxconn: 10000\n.*"
33}
34
35haproxy h3 -arg "-m 256" -conf {
36} -start
37
38haproxy h3 -cli {
39 send "show info"
40 expect ~ ".*Maxconn: 7300\n.*"
41}
42
43# 1 SSL front but no back
44
45haproxy h4 -arg "-m 256" -conf {
46 defaults
47 mode http
48 timeout connect 1s
49 timeout client 1s
50 timeout server 1s
51
52 frontend fe1
53 bind "fd@${fe1}" ssl crt ${testdir}/common.pem
54
55} -start
56
57haproxy h4 -cli {
58 send "show info"
59 expect ~ ".*Maxconn: 1900\n.*"
60}
61
62# 1 SSL back but not front
63
64haproxy h5 -arg "-m 256" -conf {
65 defaults
66 mode http
67 timeout connect 1s
68 timeout client 1s
69 timeout server 1s
70
71 listen li2
72 bind "fd@${li2}"
73 server ssl "${s1_addr}:${s1_port}" ssl verify none
74
75} -start
76
77haproxy h5 -cli {
78 send "show info"
79 expect ~ ".*Maxconn: 1900\n.*"
80}
81
82
83# 1 SSL front and 1 back
84
85haproxy h6 -arg "-m 256" -conf {
86 defaults
87 mode http
88 timeout connect 1s
89 timeout client 1s
90 timeout server 1s
91
92 listen li3
93 bind "fd@${li3}" ssl crt ${testdir}/common.pem
94 server ssl "${s1_addr}:${s1_port}" ssl verify none
95
96} -start
97
98haproxy h6 -cli {
99 send "show info"
100 expect ~ ".*Maxconn: 1700\n.*"
101}
102