Frederic Lecaille | 8b77c05 | 2018-12-13 22:15:07 +0100 | [diff] [blame] | 1 | varnishtest "Health-checks: only for servers with 'check' set" |
| 2 | feature ignore_unknown_macro |
| 3 | |
| 4 | # This test start 40 servers in the same backend, named srv0 up to srv39. |
| 5 | # Only the odd servers have health-checks enabled. |
| 6 | # The first health-checks passed tests are checked for all these servers |
| 7 | # thanks to syslog messages. |
| 8 | |
Christopher Faulet | 85a8136 | 2020-12-15 17:13:39 +0100 | [diff] [blame] | 9 | #REQUIRE_VERSION=2.4 |
Frédéric Lécaille | 15685c7 | 2018-12-20 09:55:45 +0100 | [diff] [blame] | 10 | #EXCLUDE_TARGETS=freebsd |
Frédéric Lécaille | dc1a3bd | 2019-03-29 15:07:24 +0100 | [diff] [blame] | 11 | #REGTEST_TYPE=slow |
Frédéric Lécaille | 15685c7 | 2018-12-20 09:55:45 +0100 | [diff] [blame] | 12 | |
Willy Tarreau | 43ba3cf | 2020-09-24 09:57:32 +0200 | [diff] [blame] | 13 | syslog S -repeat 20 -level notice { |
Frederic Lecaille | 8b77c05 | 2018-12-13 22:15:07 +0100 | [diff] [blame] | 14 | recv |
Willy Tarreau | 43ba3cf | 2020-09-24 09:57:32 +0200 | [diff] [blame] | 15 | expect ~ "[^:\\[ ]\\[${h1_pid}\\]: Health check for server be1/srv([13579]|[123][13579]) succeeded.+reason: Layer4 check passed.+check duration: [[:digit:]]+ms.+status: 1/1 UP" |
Frederic Lecaille | 8b77c05 | 2018-12-13 22:15:07 +0100 | [diff] [blame] | 16 | } -start |
| 17 | |
| 18 | server s0 {} -start |
| 19 | server s1 {} -start |
| 20 | server s2 {} -start |
| 21 | server s3 {} -start |
| 22 | server s4 {} -start |
| 23 | server s5 {} -start |
| 24 | server s6 {} -start |
| 25 | server s7 {} -start |
| 26 | server s8 {} -start |
| 27 | server s9 {} -start |
| 28 | server s10 {} -start |
| 29 | server s11 {} -start |
| 30 | server s12 {} -start |
| 31 | server s13 {} -start |
| 32 | server s14 {} -start |
| 33 | server s15 {} -start |
| 34 | server s16 {} -start |
| 35 | server s17 {} -start |
| 36 | server s18 {} -start |
| 37 | server s19 {} -start |
| 38 | server s20 {} -start |
| 39 | server s21 {} -start |
| 40 | server s22 {} -start |
| 41 | server s23 {} -start |
| 42 | server s24 {} -start |
| 43 | server s25 {} -start |
| 44 | server s26 {} -start |
| 45 | server s27 {} -start |
| 46 | server s28 {} -start |
| 47 | server s29 {} -start |
| 48 | server s30 {} -start |
| 49 | server s31 {} -start |
| 50 | server s32 {} -start |
| 51 | server s33 {} -start |
| 52 | server s34 {} -start |
| 53 | server s35 {} -start |
| 54 | server s36 {} -start |
| 55 | server s37 {} -start |
| 56 | server s38 {} -start |
| 57 | server s39 {} -start |
| 58 | |
| 59 | haproxy h1 -conf { |
| 60 | defaults |
| 61 | timeout client 1s |
| 62 | timeout server 1s |
| 63 | timeout connect 1s |
Christopher Faulet | 617780f | 2020-04-07 08:00:35 +0200 | [diff] [blame] | 64 | default-server no-check inter 200ms downinter 100ms rise 1 fall 1 |
Frederic Lecaille | 8b77c05 | 2018-12-13 22:15:07 +0100 | [diff] [blame] | 65 | |
| 66 | backend be1 |
| 67 | option log-health-checks |
| 68 | log ${S_addr}:${S_port} daemon |
| 69 | server srv0 ${s0_addr}:${s0_port} |
| 70 | server srv1 ${s1_addr}:${s1_port} check |
| 71 | server srv2 ${s2_addr}:${s2_port} |
| 72 | server srv3 ${s3_addr}:${s3_port} check |
| 73 | server srv4 ${s4_addr}:${s4_port} |
| 74 | server srv5 ${s5_addr}:${s5_port} check |
| 75 | server srv6 ${s6_addr}:${s6_port} |
| 76 | server srv7 ${s7_addr}:${s7_port} check |
| 77 | server srv8 ${s8_addr}:${s8_port} |
| 78 | server srv9 ${s9_addr}:${s9_port} check |
| 79 | server srv10 ${s10_addr}:${s10_port} |
| 80 | server srv11 ${s11_addr}:${s11_port} check |
| 81 | server srv12 ${s12_addr}:${s12_port} |
| 82 | server srv13 ${s13_addr}:${s13_port} check |
| 83 | server srv14 ${s14_addr}:${s14_port} |
| 84 | server srv15 ${s15_addr}:${s15_port} check |
| 85 | server srv16 ${s16_addr}:${s16_port} |
| 86 | server srv17 ${s17_addr}:${s17_port} check |
| 87 | server srv18 ${s18_addr}:${s18_port} |
| 88 | server srv19 ${s19_addr}:${s19_port} check |
| 89 | server srv20 ${s20_addr}:${s20_port} |
| 90 | server srv21 ${s21_addr}:${s21_port} check |
| 91 | server srv22 ${s22_addr}:${s22_port} |
| 92 | server srv23 ${s23_addr}:${s23_port} check |
| 93 | server srv24 ${s24_addr}:${s24_port} |
| 94 | server srv25 ${s25_addr}:${s25_port} check |
| 95 | server srv26 ${s26_addr}:${s26_port} |
| 96 | server srv27 ${s27_addr}:${s27_port} check |
| 97 | server srv28 ${s28_addr}:${s28_port} |
| 98 | server srv29 ${s29_addr}:${s29_port} check |
| 99 | server srv30 ${s30_addr}:${s30_port} |
| 100 | server srv31 ${s31_addr}:${s31_port} check |
| 101 | server srv32 ${s32_addr}:${s32_port} |
| 102 | server srv33 ${s33_addr}:${s33_port} check |
| 103 | server srv34 ${s34_addr}:${s34_port} |
| 104 | server srv35 ${s35_addr}:${s35_port} check |
| 105 | server srv36 ${s36_addr}:${s36_port} |
| 106 | server srv37 ${s37_addr}:${s37_port} check |
| 107 | server srv38 ${s38_addr}:${s38_port} |
| 108 | server srv39 ${s39_addr}:${s39_port} check |
| 109 | } -start |
| 110 | |
| 111 | syslog S -wait |
| 112 | |
| 113 | haproxy h1 -cli { |
| 114 | send "show servers state" |
William Dauchy | f637044 | 2020-11-14 19:25:33 +0100 | [diff] [blame] | 115 | expect ~ "# be_id be_name srv_id srv_name srv_addr srv_op_state srv_admin_state srv_uweight srv_iweight srv_time_since_last_change srv_check_status srv_check_result srv_check_health srv_check_state srv_agent_state bk_f_forced_id srv_f_forced_id srv_fqdn srv_port srvrecord srv_use_ssl\n2 be1 1 srv0 ${s0_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s0_port} - 0\n2 be1 2 srv1 ${s1_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s1_port} - 0\n2 be1 3 srv2 ${s2_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s2_port} - 0\n2 be1 4 srv3 ${s3_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s3_port} - 0\n2 be1 5 srv4 ${s4_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s4_port} - 0\n2 be1 6 srv5 ${s5_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s5_port} - 0\n2 be1 7 srv6 ${s6_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s6_port} - 0\n2 be1 8 srv7 ${s7_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s7_port} - 0\n2 be1 9 srv8 ${s8_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s8_port} - 0\n2 be1 10 srv9 ${s9_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s9_port} - 0\n2 be1 11 srv10 ${s10_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s10_port} - 0\n2 be1 12 srv11 ${s11_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s11_port} - 0\n2 be1 13 srv12 ${s12_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s12_port} - 0\n2 be1 14 srv13 ${s13_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s13_port} - 0\n2 be1 15 srv14 ${s14_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s14_port} - 0\n2 be1 16 srv15 ${s15_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s15_port} - 0\n2 be1 17 srv16 ${s16_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s16_port} - 0\n2 be1 18 srv17 ${s17_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s17_port} - 0\n2 be1 19 srv18 ${s18_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s18_port} - 0\n2 be1 20 srv19 ${s19_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s19_port} - 0\n2 be1 21 srv20 ${s20_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s20_port} - 0\n2 be1 22 srv21 ${s21_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s21_port} - 0\n2 be1 23 srv22 ${s22_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s22_port} - 0\n2 be1 24 srv23 ${s23_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s23_port} - 0\n2 be1 25 srv24 ${s24_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s24_port} - 0\n2 be1 26 srv25 ${s25_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s25_port} - 0\n2 be1 27 srv26 ${s26_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s26_port} - 0\n2 be1 28 srv27 ${s27_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s27_port} - 0\n2 be1 29 srv28 ${s28_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s28_port} - 0\n2 be1 30 srv29 ${s29_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s29_port} - 0\n2 be1 31 srv30 ${s30_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s30_port} - 0\n2 be1 32 srv31 ${s31_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s31_port} - 0\n2 be1 33 srv32 ${s32_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s32_port} - 0\n2 be1 34 srv33 ${s33_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s33_port} - 0\n2 be1 35 srv34 ${s34_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s34_port} - 0\n2 be1 36 srv35 ${s35_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s35_port} - 0\n2 be1 37 srv36 ${s36_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s36_port} - 0\n2 be1 38 srv37 ${s37_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s37_port} - 0\n2 be1 39 srv38 ${s38_addr} 2 0 1 1 [[:digit:]]+ 1 0 1 0 0 0 0 - ${s38_port} - 0\n2 be1 40 srv39 ${s39_addr} 2 0 1 1 [[:digit:]]+ 6 ([[:digit:]]+ ){3}0 0 0 - ${s39_port} - 0\n" |
Frederic Lecaille | 8b77c05 | 2018-12-13 22:15:07 +0100 | [diff] [blame] | 116 | } |
| 117 | |