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