Merge ~hloeung/content-cache-charm:haproxy-config into content-cache-charm:master
- Git
- lp:~hloeung/content-cache-charm
- haproxy-config
- Merge into master
Proposed by
Haw Loeung
Status: | Merged |
---|---|
Approved by: | Jay Kuri |
Approved revision: | 5ad6f1c42aa974f083052f5c0a66b7a7ad86f8cb |
Merged at revision: | f640753c7c52a81131bb70b1c34774c20ff4d542 |
Proposed branch: | ~hloeung/content-cache-charm:haproxy-config |
Merge into: | content-cache-charm:master |
Diff against target: |
434 lines (+58/-1) 11 files modified
lib/haproxy.py (+5/-1) reactive/content_cache.py (+5/-0) tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+10/-0) tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+2/-0) tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+1/-0) tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+10/-0) tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+2/-0) tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+10/-0) tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+10/-0) tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+1/-0) tests/unit/test_content_cache.py (+2/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Canonical IS Reviewers | Pending | ||
Content Cache Charmers | Pending | ||
Review via email: mp+396208@code.launchpad.net |
Commit message
Improve resiliency with HAProxy redispatch
This is as suggested by Jay in an internal ticket. Note that retries already defaults to 3.
Description of the change
To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : | # |
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : | # |
Change successfully merged at revision f640753c7c52a81
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/lib/haproxy.py b/lib/haproxy.py | |||
2 | index a68068b..14d0fc7 100644 | |||
3 | --- a/lib/haproxy.py | |||
4 | +++ b/lib/haproxy.py | |||
5 | @@ -303,7 +303,11 @@ backend backend-{name} | |||
6 | 303 | 303 | ||
7 | 304 | opts = [] | 304 | opts = [] |
8 | 305 | for option in loc_conf.get('backend-options', []): | 305 | for option in loc_conf.get('backend-options', []): |
10 | 306 | opts.append('{indent}option {opt}'.format(opt=option, indent=INDENT)) | 306 | prefix = '' |
11 | 307 | if option.split()[0] in ['allbackups', 'forceclose', 'forwardfor', 'redispatch']: | ||
12 | 308 | prefix = 'option ' | ||
13 | 309 | opts.append('{indent}{prefix}{opt}'.format(opt=option, prefix=prefix, indent=INDENT)) | ||
14 | 310 | |||
15 | 307 | options = '' | 311 | options = '' |
16 | 308 | if opts: | 312 | if opts: |
17 | 309 | options = '\n'.join(opts + ['']) | 313 | options = '\n'.join(opts + ['']) |
18 | diff --git a/reactive/content_cache.py b/reactive/content_cache.py | |||
19 | index 42c0997..5d6ddee 100644 | |||
20 | --- a/reactive/content_cache.py | |||
21 | +++ b/reactive/content_cache.py | |||
22 | @@ -298,9 +298,14 @@ def configure_haproxy(): # NOQA: C901 LP#1825084 | |||
23 | 298 | if backend_check_path: | 298 | if backend_check_path: |
24 | 299 | new_cached_loc_conf['backend-check-path'] = backend_check_path | 299 | new_cached_loc_conf['backend-check-path'] = backend_check_path |
25 | 300 | new_loc_conf['backend-check-path'] = backend_check_path | 300 | new_loc_conf['backend-check-path'] = backend_check_path |
26 | 301 | new_loc_conf['backend-options'] = [] | ||
27 | 301 | backend_options = loc_conf.get('backend-options') | 302 | backend_options = loc_conf.get('backend-options') |
28 | 302 | if backend_options: | 303 | if backend_options: |
29 | 303 | new_loc_conf['backend-options'] = backend_options | 304 | new_loc_conf['backend-options'] = backend_options |
30 | 305 | |||
31 | 306 | # Make it more resilient to failures and redispatch requests to different backends. | ||
32 | 307 | new_loc_conf['backend-options'].append('redispatch 1') | ||
33 | 308 | |||
34 | 304 | new_cached_loc_conf['signed-url-hmac-key'] = loc_conf.get('signed-url-hmac-key') | 309 | new_cached_loc_conf['signed-url-hmac-key'] = loc_conf.get('signed-url-hmac-key') |
35 | 305 | # Pass through selected backend location configs, if defined. | 310 | # Pass through selected backend location configs, if defined. |
36 | 306 | for key in ('site-name', 'backend-inter-time', 'backend-tls'): | 311 | for key in ('site-name', 'backend-inter-time', 'backend-tls'): |
37 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt | |||
38 | index bd1bd1e..6fa7004 100644 | |||
39 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt | |||
40 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt | |||
41 | @@ -147,6 +147,7 @@ backend backend-cached-site1-local | |||
42 | 147 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 147 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
43 | 148 | 148 | ||
44 | 149 | backend backend-site1-local | 149 | backend backend-site1-local |
45 | 150 | option redispatch 1 | ||
46 | 150 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 151 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
47 | 151 | http-request set-header Host site1.local | 152 | http-request set-header Host site1.local |
48 | 152 | balance leastconn | 153 | balance leastconn |
49 | @@ -162,6 +163,7 @@ backend backend-cached-site2-local | |||
50 | 162 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 | 163 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 |
51 | 163 | 164 | ||
52 | 164 | backend backend-site2-local | 165 | backend backend-site2-local |
53 | 166 | option redispatch 1 | ||
54 | 165 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 167 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
55 | 166 | http-request set-header Host site2.local | 168 | http-request set-header Host site2.local |
56 | 167 | balance leastconn | 169 | balance leastconn |
57 | @@ -179,6 +181,7 @@ backend backend-cached-site3-local | |||
58 | 179 | backend backend-site3-local | 181 | backend backend-site3-local |
59 | 180 | option forwardfor except 127.0.0.1 | 182 | option forwardfor except 127.0.0.1 |
60 | 181 | option forceclose | 183 | option forceclose |
61 | 184 | option redispatch 1 | ||
62 | 182 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 185 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
63 | 183 | http-request set-header Host site3.local | 186 | http-request set-header Host site3.local |
64 | 184 | balance leastconn | 187 | balance leastconn |
65 | @@ -201,12 +204,14 @@ backend backend-cached-site5 | |||
66 | 201 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 | 204 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 |
67 | 202 | 205 | ||
68 | 203 | backend backend-site5 | 206 | backend backend-site5 |
69 | 207 | option redispatch 1 | ||
70 | 204 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 208 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
71 | 205 | http-request set-header Host site5.local | 209 | http-request set-header Host site5.local |
72 | 206 | balance leastconn | 210 | balance leastconn |
73 | 207 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 211 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
74 | 208 | 212 | ||
75 | 209 | backend backend-site5-2 | 213 | backend backend-site5-2 |
76 | 214 | option redispatch 1 | ||
77 | 210 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 215 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
78 | 211 | http-request set-header Host site5.local | 216 | http-request set-header Host site5.local |
79 | 212 | balance leastconn | 217 | balance leastconn |
80 | @@ -220,6 +225,7 @@ backend backend-cached-site6-local | |||
81 | 220 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 | 225 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 |
82 | 221 | 226 | ||
83 | 222 | backend backend-site6-local | 227 | backend backend-site6-local |
84 | 228 | option redispatch 1 | ||
85 | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 229 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
86 | 224 | http-request set-header Host site6.local | 230 | http-request set-header Host site6.local |
87 | 225 | balance leastconn | 231 | balance leastconn |
88 | @@ -233,6 +239,7 @@ backend backend-cached-site7-local | |||
89 | 233 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 | 239 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 |
90 | 234 | 240 | ||
91 | 235 | backend backend-site7-local | 241 | backend backend-site7-local |
92 | 242 | option redispatch 1 | ||
93 | 236 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 243 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
94 | 237 | http-request set-header Host site7.local | 244 | http-request set-header Host site7.local |
95 | 238 | balance leastconn | 245 | balance leastconn |
96 | @@ -246,12 +253,14 @@ backend backend-cached-site8-local | |||
97 | 246 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 | 253 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 |
98 | 247 | 254 | ||
99 | 248 | backend backend-site8-local | 255 | backend backend-site8-local |
100 | 256 | option redispatch 1 | ||
101 | 249 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
102 | 250 | http-request set-header Host site8.local | 258 | http-request set-header Host site8.local |
103 | 251 | balance leastconn | 259 | balance leastconn |
104 | 252 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 260 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
105 | 253 | 261 | ||
106 | 254 | backend backend-site8-local-2 | 262 | backend backend-site8-local-2 |
107 | 263 | option redispatch 1 | ||
108 | 255 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 264 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
109 | 256 | http-request set-header Host auth.site8.local | 265 | http-request set-header Host auth.site8.local |
110 | 257 | balance leastconn | 266 | balance leastconn |
111 | @@ -265,6 +274,7 @@ backend backend-cached-site9-local | |||
112 | 265 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 | 274 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 |
113 | 266 | 275 | ||
114 | 267 | backend backend-site9-local | 276 | backend backend-site9-local |
115 | 277 | option redispatch 1 | ||
116 | 268 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
117 | 269 | http-request set-header Host site9.local | 279 | http-request set-header Host site9.local |
118 | 270 | balance leastconn | 280 | balance leastconn |
119 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt | |||
120 | index ef8dfa0..fe8a37f 100644 | |||
121 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt | |||
122 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt | |||
123 | @@ -93,6 +93,8 @@ backend backend-cached-site1-local | |||
124 | 93 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 93 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
125 | 94 | 94 | ||
126 | 95 | backend backend-site1-local | 95 | backend backend-site1-local |
127 | 96 | retries 3 | ||
128 | 97 | option redispatch 1 | ||
129 | 96 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 98 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
130 | 97 | http-request set-header Host site1.local | 99 | http-request set-header Host site1.local |
131 | 98 | balance leastconn | 100 | balance leastconn |
132 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt | |||
133 | index ad10667..0c134d3 100644 | |||
134 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt | |||
135 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt | |||
136 | @@ -98,6 +98,7 @@ backend backend-cached-site1-local | |||
137 | 98 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 98 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
138 | 99 | 99 | ||
139 | 100 | backend backend-site1-local | 100 | backend backend-site1-local |
140 | 101 | option redispatch 1 | ||
141 | 101 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 102 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
142 | 102 | http-request set-header Host site1.local | 103 | http-request set-header Host site1.local |
143 | 103 | balance leastconn | 104 | balance leastconn |
144 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt | |||
145 | index d7c2c0a..9bc7d2b 100644 | |||
146 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt | |||
147 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt | |||
148 | @@ -147,6 +147,7 @@ backend backend-cached-site1-local | |||
149 | 147 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 147 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
150 | 148 | 148 | ||
151 | 149 | backend backend-site1-local | 149 | backend backend-site1-local |
152 | 150 | option redispatch 1 | ||
153 | 150 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 151 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
154 | 151 | http-request set-header Host site1.local | 152 | http-request set-header Host site1.local |
155 | 152 | balance leastconn | 153 | balance leastconn |
156 | @@ -162,6 +163,7 @@ backend backend-cached-site2-local | |||
157 | 162 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 | 163 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 |
158 | 163 | 164 | ||
159 | 164 | backend backend-site2-local | 165 | backend backend-site2-local |
160 | 166 | option redispatch 1 | ||
161 | 165 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 167 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
162 | 166 | http-request set-header Host site2.local | 168 | http-request set-header Host site2.local |
163 | 167 | balance leastconn | 169 | balance leastconn |
164 | @@ -179,6 +181,7 @@ backend backend-cached-site3-local | |||
165 | 179 | backend backend-site3-local | 181 | backend backend-site3-local |
166 | 180 | option forwardfor except 127.0.0.1 | 182 | option forwardfor except 127.0.0.1 |
167 | 181 | option forceclose | 183 | option forceclose |
168 | 184 | option redispatch 1 | ||
169 | 182 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 185 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
170 | 183 | http-request set-header Host site3.local | 186 | http-request set-header Host site3.local |
171 | 184 | balance leastconn | 187 | balance leastconn |
172 | @@ -201,12 +204,14 @@ backend backend-cached-site5 | |||
173 | 201 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 | 204 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 |
174 | 202 | 205 | ||
175 | 203 | backend backend-site5 | 206 | backend backend-site5 |
176 | 207 | option redispatch 1 | ||
177 | 204 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 208 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
178 | 205 | http-request set-header Host site5.local | 209 | http-request set-header Host site5.local |
179 | 206 | balance leastconn | 210 | balance leastconn |
180 | 207 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 211 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
181 | 208 | 212 | ||
182 | 209 | backend backend-site5-2 | 213 | backend backend-site5-2 |
183 | 214 | option redispatch 1 | ||
184 | 210 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 215 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
185 | 211 | http-request set-header Host site5.local | 216 | http-request set-header Host site5.local |
186 | 212 | balance leastconn | 217 | balance leastconn |
187 | @@ -220,6 +225,7 @@ backend backend-cached-site6-local | |||
188 | 220 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 | 225 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 |
189 | 221 | 226 | ||
190 | 222 | backend backend-site6-local | 227 | backend backend-site6-local |
191 | 228 | option redispatch 1 | ||
192 | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 229 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
193 | 224 | http-request set-header Host site6.local | 230 | http-request set-header Host site6.local |
194 | 225 | balance leastconn | 231 | balance leastconn |
195 | @@ -233,6 +239,7 @@ backend backend-cached-site7-local | |||
196 | 233 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 | 239 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 |
197 | 234 | 240 | ||
198 | 235 | backend backend-site7-local | 241 | backend backend-site7-local |
199 | 242 | option redispatch 1 | ||
200 | 236 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 243 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
201 | 237 | http-request set-header Host site7.local | 244 | http-request set-header Host site7.local |
202 | 238 | balance leastconn | 245 | balance leastconn |
203 | @@ -246,12 +253,14 @@ backend backend-cached-site8-local | |||
204 | 246 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 | 253 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 |
205 | 247 | 254 | ||
206 | 248 | backend backend-site8-local | 255 | backend backend-site8-local |
207 | 256 | option redispatch 1 | ||
208 | 249 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
209 | 250 | http-request set-header Host site8.local | 258 | http-request set-header Host site8.local |
210 | 251 | balance leastconn | 259 | balance leastconn |
211 | 252 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 260 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
212 | 253 | 261 | ||
213 | 254 | backend backend-site8-local-2 | 262 | backend backend-site8-local-2 |
214 | 263 | option redispatch 1 | ||
215 | 255 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 264 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
216 | 256 | http-request set-header Host auth.site8.local | 265 | http-request set-header Host auth.site8.local |
217 | 257 | balance leastconn | 266 | balance leastconn |
218 | @@ -265,6 +274,7 @@ backend backend-cached-site9-local | |||
219 | 265 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 | 274 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 |
220 | 266 | 275 | ||
221 | 267 | backend backend-site9-local | 276 | backend backend-site9-local |
222 | 277 | option redispatch 1 | ||
223 | 268 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
224 | 269 | http-request set-header Host site9.local | 279 | http-request set-header Host site9.local |
225 | 270 | balance leastconn | 280 | balance leastconn |
226 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt | |||
227 | index 06670cd..7f6ab4d 100644 | |||
228 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt | |||
229 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt | |||
230 | @@ -98,6 +98,7 @@ backend backend-cached-site1-local | |||
231 | 98 | 98 | ||
232 | 99 | backend backend-site1-local | 99 | backend backend-site1-local |
233 | 100 | option allbackups | 100 | option allbackups |
234 | 101 | option redispatch 1 | ||
235 | 101 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 102 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
236 | 102 | http-request set-header Host site1.local | 103 | http-request set-header Host site1.local |
237 | 103 | balance leastconn | 104 | balance leastconn |
238 | @@ -105,6 +106,7 @@ backend backend-site1-local | |||
239 | 105 | server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 2048 | 106 | server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 2048 |
240 | 106 | 107 | ||
241 | 107 | backend backend-site1-local-2 | 108 | backend backend-site1-local-2 |
242 | 109 | option redispatch 1 | ||
243 | 108 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 110 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
244 | 109 | http-request set-header Host site1.local | 111 | http-request set-header Host site1.local |
245 | 110 | balance leastconn | 112 | balance leastconn |
246 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt | |||
247 | index 486f3a2..645b39c 100644 | |||
248 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt | |||
249 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt | |||
250 | @@ -147,6 +147,7 @@ backend backend-cached-site1-local | |||
251 | 147 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 147 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
252 | 148 | 148 | ||
253 | 149 | backend backend-site1-local | 149 | backend backend-site1-local |
254 | 150 | option redispatch 1 | ||
255 | 150 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 151 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
256 | 151 | http-request set-header Host site1.local | 152 | http-request set-header Host site1.local |
257 | 152 | balance roundrobin | 153 | balance roundrobin |
258 | @@ -162,6 +163,7 @@ backend backend-cached-site2-local | |||
259 | 162 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 | 163 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 |
260 | 163 | 164 | ||
261 | 164 | backend backend-site2-local | 165 | backend backend-site2-local |
262 | 166 | option redispatch 1 | ||
263 | 165 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 167 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
264 | 166 | http-request set-header Host site2.local | 168 | http-request set-header Host site2.local |
265 | 167 | balance roundrobin | 169 | balance roundrobin |
266 | @@ -179,6 +181,7 @@ backend backend-cached-site3-local | |||
267 | 179 | backend backend-site3-local | 181 | backend backend-site3-local |
268 | 180 | option forwardfor except 127.0.0.1 | 182 | option forwardfor except 127.0.0.1 |
269 | 181 | option forceclose | 183 | option forceclose |
270 | 184 | option redispatch 1 | ||
271 | 182 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 185 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
272 | 183 | http-request set-header Host site3.local | 186 | http-request set-header Host site3.local |
273 | 184 | balance roundrobin | 187 | balance roundrobin |
274 | @@ -201,12 +204,14 @@ backend backend-cached-site5 | |||
275 | 201 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 | 204 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 |
276 | 202 | 205 | ||
277 | 203 | backend backend-site5 | 206 | backend backend-site5 |
278 | 207 | option redispatch 1 | ||
279 | 204 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 208 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
280 | 205 | http-request set-header Host site5.local | 209 | http-request set-header Host site5.local |
281 | 206 | balance roundrobin | 210 | balance roundrobin |
282 | 207 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 211 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
283 | 208 | 212 | ||
284 | 209 | backend backend-site5-2 | 213 | backend backend-site5-2 |
285 | 214 | option redispatch 1 | ||
286 | 210 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 215 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
287 | 211 | http-request set-header Host site5.local | 216 | http-request set-header Host site5.local |
288 | 212 | balance roundrobin | 217 | balance roundrobin |
289 | @@ -220,6 +225,7 @@ backend backend-cached-site6-local | |||
290 | 220 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 | 225 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 |
291 | 221 | 226 | ||
292 | 222 | backend backend-site6-local | 227 | backend backend-site6-local |
293 | 228 | option redispatch 1 | ||
294 | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 229 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
295 | 224 | http-request set-header Host site6.local | 230 | http-request set-header Host site6.local |
296 | 225 | balance roundrobin | 231 | balance roundrobin |
297 | @@ -233,6 +239,7 @@ backend backend-cached-site7-local | |||
298 | 233 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 | 239 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 |
299 | 234 | 240 | ||
300 | 235 | backend backend-site7-local | 241 | backend backend-site7-local |
301 | 242 | option redispatch 1 | ||
302 | 236 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 243 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
303 | 237 | http-request set-header Host site7.local | 244 | http-request set-header Host site7.local |
304 | 238 | balance roundrobin | 245 | balance roundrobin |
305 | @@ -246,12 +253,14 @@ backend backend-cached-site8-local | |||
306 | 246 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 | 253 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 |
307 | 247 | 254 | ||
308 | 248 | backend backend-site8-local | 255 | backend backend-site8-local |
309 | 256 | option redispatch 1 | ||
310 | 249 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
311 | 250 | http-request set-header Host site8.local | 258 | http-request set-header Host site8.local |
312 | 251 | balance roundrobin | 259 | balance roundrobin |
313 | 252 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 260 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
314 | 253 | 261 | ||
315 | 254 | backend backend-site8-local-2 | 262 | backend backend-site8-local-2 |
316 | 263 | option redispatch 1 | ||
317 | 255 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 264 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
318 | 256 | http-request set-header Host auth.site8.local | 265 | http-request set-header Host auth.site8.local |
319 | 257 | balance roundrobin | 266 | balance roundrobin |
320 | @@ -265,6 +274,7 @@ backend backend-cached-site9-local | |||
321 | 265 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 | 274 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 |
322 | 266 | 275 | ||
323 | 267 | backend backend-site9-local | 276 | backend backend-site9-local |
324 | 277 | option redispatch 1 | ||
325 | 268 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
326 | 269 | http-request set-header Host site9.local | 279 | http-request set-header Host site9.local |
327 | 270 | balance roundrobin | 280 | balance roundrobin |
328 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt | |||
329 | index 4e64b08..8e65dbc 100644 | |||
330 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt | |||
331 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt | |||
332 | @@ -148,6 +148,7 @@ backend backend-cached-site1-local | |||
333 | 148 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 148 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
334 | 149 | 149 | ||
335 | 150 | backend backend-site1-local | 150 | backend backend-site1-local |
336 | 151 | option redispatch 1 | ||
337 | 151 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 152 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
338 | 152 | http-request set-header Host site1.local | 153 | http-request set-header Host site1.local |
339 | 153 | balance leastconn | 154 | balance leastconn |
340 | @@ -163,6 +164,7 @@ backend backend-cached-site2-local | |||
341 | 163 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 | 164 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 2048 |
342 | 164 | 165 | ||
343 | 165 | backend backend-site2-local | 166 | backend backend-site2-local |
344 | 167 | option redispatch 1 | ||
345 | 166 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 168 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
346 | 167 | http-request set-header Host site2.local | 169 | http-request set-header Host site2.local |
347 | 168 | balance leastconn | 170 | balance leastconn |
348 | @@ -180,6 +182,7 @@ backend backend-cached-site3-local | |||
349 | 180 | backend backend-site3-local | 182 | backend backend-site3-local |
350 | 181 | option forwardfor except 127.0.0.1 | 183 | option forwardfor except 127.0.0.1 |
351 | 182 | option forceclose | 184 | option forceclose |
352 | 185 | option redispatch 1 | ||
353 | 183 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 186 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
354 | 184 | http-request set-header Host site3.local | 187 | http-request set-header Host site3.local |
355 | 185 | balance leastconn | 188 | balance leastconn |
356 | @@ -202,12 +205,14 @@ backend backend-cached-site5 | |||
357 | 202 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 | 205 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 2048 |
358 | 203 | 206 | ||
359 | 204 | backend backend-site5 | 207 | backend backend-site5 |
360 | 208 | option redispatch 1 | ||
361 | 205 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 209 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
362 | 206 | http-request set-header Host site5.local | 210 | http-request set-header Host site5.local |
363 | 207 | balance leastconn | 211 | balance leastconn |
364 | 208 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 212 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
365 | 209 | 213 | ||
366 | 210 | backend backend-site5-2 | 214 | backend backend-site5-2 |
367 | 215 | option redispatch 1 | ||
368 | 211 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 216 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
369 | 212 | http-request set-header Host site5.local | 217 | http-request set-header Host site5.local |
370 | 213 | balance leastconn | 218 | balance leastconn |
371 | @@ -221,6 +226,7 @@ backend backend-cached-site6-local | |||
372 | 221 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 | 226 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 2048 |
373 | 222 | 227 | ||
374 | 223 | backend backend-site6-local | 228 | backend backend-site6-local |
375 | 229 | option redispatch 1 | ||
376 | 224 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 230 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
377 | 225 | http-request set-header Host site6.local | 231 | http-request set-header Host site6.local |
378 | 226 | balance leastconn | 232 | balance leastconn |
379 | @@ -234,6 +240,7 @@ backend backend-cached-site7-local | |||
380 | 234 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 | 240 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 2048 |
381 | 235 | 241 | ||
382 | 236 | backend backend-site7-local | 242 | backend backend-site7-local |
383 | 243 | option redispatch 1 | ||
384 | 237 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 244 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
385 | 238 | http-request set-header Host site7.local | 245 | http-request set-header Host site7.local |
386 | 239 | balance leastconn | 246 | balance leastconn |
387 | @@ -247,12 +254,14 @@ backend backend-cached-site8-local | |||
388 | 247 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 | 254 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 2048 |
389 | 248 | 255 | ||
390 | 249 | backend backend-site8-local | 256 | backend backend-site8-local |
391 | 257 | option redispatch 1 | ||
392 | 250 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 258 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
393 | 251 | http-request set-header Host site8.local | 259 | http-request set-header Host site8.local |
394 | 252 | balance leastconn | 260 | balance leastconn |
395 | 253 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 2048 |
396 | 254 | 262 | ||
397 | 255 | backend backend-site8-local-2 | 263 | backend backend-site8-local-2 |
398 | 264 | option redispatch 1 | ||
399 | 256 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 265 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
400 | 257 | http-request set-header Host auth.site8.local | 266 | http-request set-header Host auth.site8.local |
401 | 258 | balance leastconn | 267 | balance leastconn |
402 | @@ -266,6 +275,7 @@ backend backend-cached-site9-local | |||
403 | 266 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 | 275 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 2048 |
404 | 267 | 276 | ||
405 | 268 | backend backend-site9-local | 277 | backend backend-site9-local |
406 | 278 | option redispatch 1 | ||
407 | 269 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 279 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
408 | 270 | http-request set-header Host site9.local | 280 | http-request set-header Host site9.local |
409 | 271 | balance leastconn | 281 | balance leastconn |
410 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt | |||
411 | index 5391a03..9c3ead5 100644 | |||
412 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt | |||
413 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt | |||
414 | @@ -93,6 +93,7 @@ backend backend-cached-site1-local | |||
415 | 93 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 | 93 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 2048 |
416 | 94 | 94 | ||
417 | 95 | backend backend-site1-local | 95 | backend backend-site1-local |
418 | 96 | option redispatch 1 | ||
419 | 96 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache | 97 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache |
420 | 97 | http-request set-header Host site1.local | 98 | http-request set-header Host site1.local |
421 | 98 | balance leastconn | 99 | balance leastconn |
422 | diff --git a/tests/unit/test_content_cache.py b/tests/unit/test_content_cache.py | |||
423 | index 1c11a30..ef464aa 100644 | |||
424 | --- a/tests/unit/test_content_cache.py | |||
425 | +++ b/tests/unit/test_content_cache.py | |||
426 | @@ -421,6 +421,8 @@ site1.local: | |||
427 | 421 | /: | 421 | /: |
428 | 422 | backend-tls: false | 422 | backend-tls: false |
429 | 423 | backends: ['192.168.1.1:8080'] | 423 | backends: ['192.168.1.1:8080'] |
430 | 424 | backend-options: | ||
431 | 425 | - retries 3 | ||
432 | 424 | tls-cert-bundle-path: /var/lib/haproxy/certs | 426 | tls-cert-bundle-path: /var/lib/haproxy/certs |
433 | 425 | ''' | 427 | ''' |
434 | 426 | self.mock_config.return_value = {'haproxy_hard_stop_after': '15m', 'max_connections': 8192, 'sites': config} | 428 | self.mock_config.return_value = {'haproxy_hard_stop_after': '15m', 'max_connections': 8192, 'sites': config} |
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.