Merge ~hloeung/content-cache-charm:log into content-cache-charm:master
- Git
- lp:~hloeung/content-cache-charm
- log
- Merge into master
Proposed by
Haw Loeung
Status: | Merged |
---|---|
Approved by: | Haw Loeung |
Approved revision: | 3bd2938698a7bdad5ada38ac84c635108749fc43 |
Merged at revision: | 3fcb042a6fa949de6f11419b0c61e454c9ed7d11 |
Proposed branch: | ~hloeung/content-cache-charm:log |
Merge into: | content-cache-charm:master |
Diff against target: |
1640 lines (+527/-252) 15 files modified
lib/haproxy.py (+15/-9) reactive/content_cache.py (+0/-1) tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+76/-38) tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+8/-4) tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+8/-4) tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+76/-38) tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+12/-6) tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+76/-38) tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+76/-38) tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+76/-38) tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+8/-4) tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt (+31/-11) tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt (+3/-1) tests/unit/files/haproxy_config_rendered_test_output.txt (+31/-11) tests/unit/files/haproxy_config_rendered_test_output2.txt (+31/-11) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Misare | Approve | ||
Canonical IS Reviewers | Pending | ||
Review via email: mp+397703@code.launchpad.net |
Commit message
Use 'http-check send hdr' instead of adding headers at end of httpchk version
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 3fcb042a6fa949d
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 597131e..d9836a7 100644 |
3 | --- a/lib/haproxy.py |
4 | +++ b/lib/haproxy.py |
5 | @@ -222,9 +222,9 @@ listen {name} |
6 | def render_stanza_backend(self, config): # NOQA: C901 |
7 | backend_stanza = """ |
8 | backend backend-{name} |
9 | -{indent}{httpchk} |
10 | -{options}{indent}http-request set-header Host {site_name} |
11 | -{indent}balance {load_balancing_algorithm} |
12 | +{indent}http-request set-header Host {site_name} |
13 | +{httpchk} |
14 | +{options}{indent}balance {load_balancing_algorithm} |
15 | {backends} |
16 | """ |
17 | rendered_output = [] |
18 | @@ -318,17 +318,23 @@ backend backend-{name} |
19 | if opts: |
20 | options = '\n'.join(opts + ['']) |
21 | |
22 | - httpchk = ( |
23 | - r"option httpchk {method} {path} HTTP/1.0\r\n" |
24 | - r"Host:\ {site_name}\r\n" |
25 | - r"User-Agent:\ haproxy/httpchk" |
26 | - ).format(method=method, path=path, site_name=site_name) |
27 | + httpchk = [] |
28 | + # Add X-Cache-Request-IP for caching layer to log real client IP. |
29 | + if backend_name.startswith('cached-'): |
30 | + httpchk.append('{indent}http-request set-header X-Cache-Request-IP %[src]'.format(indent=INDENT)) |
31 | + httpchk.append( |
32 | + '{indent}http-check send hdr Host {site_name}'.format(site_name=site_name, indent=INDENT) |
33 | + ) |
34 | + httpchk.append('{indent}http-check send hdr User-Agent haproxy/httpchk'.format(indent=INDENT)) |
35 | + httpchk.append( |
36 | + '{indent}option httpchk {method} {path} HTTP/1.0'.format(method=method, path=path, indent=INDENT) |
37 | + ) |
38 | |
39 | output = backend_stanza.format( |
40 | name=backend_name, |
41 | site=site, |
42 | site_name=site_name, |
43 | - httpchk=httpchk, |
44 | + httpchk='\n'.join(httpchk), |
45 | load_balancing_algorithm=self.load_balancing_algorithm, |
46 | backends='\n'.join(backend_confs), |
47 | options=options, |
48 | diff --git a/reactive/content_cache.py b/reactive/content_cache.py |
49 | index 9f95727..eeb24fe 100644 |
50 | --- a/reactive/content_cache.py |
51 | +++ b/reactive/content_cache.py |
52 | @@ -281,7 +281,6 @@ def configure_haproxy(): # NOQA: C901 LP#1825084 |
53 | # Also, for caching layer, we want higher fall count as it's less |
54 | # likely the caching layer is down, 2 mins here (inter * fall). |
55 | new_cached_loc_conf['backend-fall-count'] = 60 |
56 | - new_cached_loc_conf['backend-options'] = ['http-request set-header X-Cache-Request-IP %[src]'] |
57 | |
58 | # No backends |
59 | if not site_conf['locations'][location].get('backends'): |
60 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt |
61 | index 2e20fd6..71b7714 100644 |
62 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt |
63 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt |
64 | @@ -155,142 +155,180 @@ listen site9-local |
65 | default_backend backend-site9-local |
66 | |
67 | backend backend-cached-site1-local |
68 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
69 | - http-request set-header X-Cache-Request-IP %[src] |
70 | http-request set-header Host site1.local |
71 | + http-request set-header X-Cache-Request-IP %[src] |
72 | + http-check send hdr Host site1.local |
73 | + http-check send hdr User-Agent haproxy/httpchk |
74 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
75 | balance leastconn |
76 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
77 | |
78 | backend backend-site1-local |
79 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
80 | - option redispatch 1 |
81 | http-request set-header Host site1.local |
82 | + http-check send hdr Host site1.local |
83 | + http-check send hdr User-Agent haproxy/httpchk |
84 | + option httpchk HEAD / HTTP/1.0 |
85 | + option redispatch 1 |
86 | balance leastconn |
87 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
88 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
89 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
90 | |
91 | backend backend-cached-site2-local |
92 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
93 | - http-request set-header X-Cache-Request-IP %[src] |
94 | http-request set-header Host site2.local |
95 | + http-request set-header X-Cache-Request-IP %[src] |
96 | + http-check send hdr Host site2.local |
97 | + http-check send hdr User-Agent haproxy/httpchk |
98 | + option httpchk GET /check/ HTTP/1.0 |
99 | balance leastconn |
100 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
101 | |
102 | backend backend-site2-local |
103 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
104 | - option redispatch 1 |
105 | http-request set-header Host site2.local |
106 | + http-check send hdr Host site2.local |
107 | + http-check send hdr User-Agent haproxy/httpchk |
108 | + option httpchk GET /check/ HTTP/1.0 |
109 | + option redispatch 1 |
110 | balance leastconn |
111 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
112 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
113 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
114 | |
115 | backend backend-cached-site3-local |
116 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
117 | - http-request set-header X-Cache-Request-IP %[src] |
118 | http-request set-header Host site3.local |
119 | + http-request set-header X-Cache-Request-IP %[src] |
120 | + http-check send hdr Host site3.local |
121 | + http-check send hdr User-Agent haproxy/httpchk |
122 | + option httpchk HEAD / HTTP/1.0 |
123 | balance leastconn |
124 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
125 | |
126 | backend backend-site3-local |
127 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
128 | + http-request set-header Host site3.local |
129 | + http-check send hdr Host site3.local |
130 | + http-check send hdr User-Agent haproxy/httpchk |
131 | + option httpchk HEAD / HTTP/1.0 |
132 | option forwardfor except 127.0.0.1 192.168.1.1 |
133 | option forceclose |
134 | option redispatch 1 |
135 | - http-request set-header Host site3.local |
136 | balance leastconn |
137 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
138 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
139 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
140 | |
141 | backend backend-cached-site4-local |
142 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
143 | - http-request set-header X-Cache-Request-IP %[src] |
144 | http-request set-header Host site4.local |
145 | + http-request set-header X-Cache-Request-IP %[src] |
146 | + http-check send hdr Host site4.local |
147 | + http-check send hdr User-Agent haproxy/httpchk |
148 | + option httpchk HEAD / HTTP/1.0 |
149 | balance leastconn |
150 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
151 | |
152 | backend backend-cached-site5 |
153 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
154 | - http-request set-header X-Cache-Request-IP %[src] |
155 | http-request set-header Host site5.local |
156 | + http-request set-header X-Cache-Request-IP %[src] |
157 | + http-check send hdr Host site5.local |
158 | + http-check send hdr User-Agent haproxy/httpchk |
159 | + option httpchk HEAD / HTTP/1.0 |
160 | balance leastconn |
161 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
162 | |
163 | backend backend-site5 |
164 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
165 | - option redispatch 1 |
166 | http-request set-header Host site5.local |
167 | + http-check send hdr Host site5.local |
168 | + http-check send hdr User-Agent haproxy/httpchk |
169 | + option httpchk HEAD / HTTP/1.0 |
170 | + option redispatch 1 |
171 | balance leastconn |
172 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
173 | |
174 | backend backend-site5-2 |
175 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
176 | - option redispatch 1 |
177 | http-request set-header Host site5.local |
178 | + http-check send hdr Host site5.local |
179 | + http-check send hdr User-Agent haproxy/httpchk |
180 | + option httpchk HEAD / HTTP/1.0 |
181 | + option redispatch 1 |
182 | balance leastconn |
183 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
184 | |
185 | backend backend-cached-site6-local |
186 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
187 | - http-request set-header X-Cache-Request-IP %[src] |
188 | http-request set-header Host site6.local |
189 | + http-request set-header X-Cache-Request-IP %[src] |
190 | + http-check send hdr Host site6.local |
191 | + http-check send hdr User-Agent haproxy/httpchk |
192 | + option httpchk HEAD / HTTP/1.0 |
193 | balance leastconn |
194 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
195 | |
196 | backend backend-site6-local |
197 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
198 | - option redispatch 1 |
199 | http-request set-header Host site6.local |
200 | + http-check send hdr Host site6.local |
201 | + http-check send hdr User-Agent haproxy/httpchk |
202 | + option httpchk HEAD / HTTP/1.0 |
203 | + option redispatch 1 |
204 | balance leastconn |
205 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
206 | |
207 | backend backend-cached-site7-local |
208 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
209 | - http-request set-header X-Cache-Request-IP %[src] |
210 | http-request set-header Host site7.local |
211 | + http-request set-header X-Cache-Request-IP %[src] |
212 | + http-check send hdr Host site7.local |
213 | + http-check send hdr User-Agent haproxy/httpchk |
214 | + option httpchk HEAD / HTTP/1.0 |
215 | balance leastconn |
216 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
217 | |
218 | backend backend-site7-local |
219 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
220 | - option redispatch 1 |
221 | http-request set-header Host site7.local |
222 | + http-check send hdr Host site7.local |
223 | + http-check send hdr User-Agent haproxy/httpchk |
224 | + option httpchk HEAD / HTTP/1.0 |
225 | + option redispatch 1 |
226 | balance leastconn |
227 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
228 | |
229 | backend backend-cached-site8-local |
230 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
231 | - http-request set-header X-Cache-Request-IP %[src] |
232 | http-request set-header Host site8.local |
233 | + http-request set-header X-Cache-Request-IP %[src] |
234 | + http-check send hdr Host site8.local |
235 | + http-check send hdr User-Agent haproxy/httpchk |
236 | + option httpchk HEAD / HTTP/1.0 |
237 | balance leastconn |
238 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
239 | |
240 | backend backend-site8-local |
241 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
242 | - option redispatch 1 |
243 | http-request set-header Host site8.local |
244 | + http-check send hdr Host site8.local |
245 | + http-check send hdr User-Agent haproxy/httpchk |
246 | + option httpchk HEAD / HTTP/1.0 |
247 | + option redispatch 1 |
248 | balance leastconn |
249 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
250 | |
251 | backend backend-site8-local-2 |
252 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
253 | - option redispatch 1 |
254 | http-request set-header Host auth.site8.local |
255 | + http-check send hdr Host auth.site8.local |
256 | + http-check send hdr User-Agent haproxy/httpchk |
257 | + option httpchk HEAD / HTTP/1.0 |
258 | + option redispatch 1 |
259 | balance leastconn |
260 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
261 | |
262 | backend backend-cached-site9-local |
263 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
264 | - http-request set-header X-Cache-Request-IP %[src] |
265 | http-request set-header Host site9.local |
266 | + http-request set-header X-Cache-Request-IP %[src] |
267 | + http-check send hdr Host site9.local |
268 | + http-check send hdr User-Agent haproxy/httpchk |
269 | + option httpchk HEAD / HTTP/1.0 |
270 | balance leastconn |
271 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
272 | |
273 | backend backend-site9-local |
274 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
275 | - option redispatch 1 |
276 | http-request set-header Host site9.local |
277 | + http-check send hdr Host site9.local |
278 | + http-check send hdr User-Agent haproxy/httpchk |
279 | + option httpchk HEAD / HTTP/1.0 |
280 | + option redispatch 1 |
281 | balance leastconn |
282 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
283 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt |
284 | index 5f6824b..846b16d 100644 |
285 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt |
286 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt |
287 | @@ -90,16 +90,20 @@ listen site1-local |
288 | default_backend backend-site1-local |
289 | |
290 | backend backend-cached-site1-local |
291 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
292 | - http-request set-header X-Cache-Request-IP %[src] |
293 | http-request set-header Host site1.local |
294 | + http-request set-header X-Cache-Request-IP %[src] |
295 | + http-check send hdr Host site1.local |
296 | + http-check send hdr User-Agent haproxy/httpchk |
297 | + option httpchk HEAD / HTTP/1.0 |
298 | balance leastconn |
299 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200 |
300 | |
301 | backend backend-site1-local |
302 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
303 | + http-request set-header Host site1.local |
304 | + http-check send hdr Host site1.local |
305 | + http-check send hdr User-Agent haproxy/httpchk |
306 | + option httpchk HEAD / HTTP/1.0 |
307 | retries 3 |
308 | option redispatch 1 |
309 | - http-request set-header Host site1.local |
310 | balance leastconn |
311 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
312 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt |
313 | index 83641cc..37a6665 100644 |
314 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt |
315 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt |
316 | @@ -96,15 +96,19 @@ listen site1-local |
317 | default_backend backend-site1-local |
318 | |
319 | backend backend-cached-site1-local |
320 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
321 | - http-request set-header X-Cache-Request-IP %[src] |
322 | http-request set-header Host site1.local |
323 | + http-request set-header X-Cache-Request-IP %[src] |
324 | + http-check send hdr Host site1.local |
325 | + http-check send hdr User-Agent haproxy/httpchk |
326 | + option httpchk HEAD / HTTP/1.0 |
327 | balance leastconn |
328 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200 |
329 | |
330 | backend backend-site1-local |
331 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
332 | - option redispatch 1 |
333 | http-request set-header Host site1.local |
334 | + http-check send hdr Host site1.local |
335 | + http-check send hdr User-Agent haproxy/httpchk |
336 | + option httpchk HEAD / HTTP/1.0 |
337 | + option redispatch 1 |
338 | balance leastconn |
339 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
340 | 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 |
341 | index e417ae8..5ae5568 100644 |
342 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt |
343 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt |
344 | @@ -155,142 +155,180 @@ listen site9-local |
345 | default_backend backend-site9-local |
346 | |
347 | backend backend-cached-site1-local |
348 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
349 | - http-request set-header X-Cache-Request-IP %[src] |
350 | http-request set-header Host site1.local |
351 | + http-request set-header X-Cache-Request-IP %[src] |
352 | + http-check send hdr Host site1.local |
353 | + http-check send hdr User-Agent haproxy/httpchk |
354 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
355 | balance leastconn |
356 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
357 | |
358 | backend backend-site1-local |
359 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
360 | - option redispatch 1 |
361 | http-request set-header Host site1.local |
362 | + http-check send hdr Host site1.local |
363 | + http-check send hdr User-Agent haproxy/httpchk |
364 | + option httpchk HEAD / HTTP/1.0 |
365 | + option redispatch 1 |
366 | balance leastconn |
367 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
368 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
369 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
370 | |
371 | backend backend-cached-site2-local |
372 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
373 | - http-request set-header X-Cache-Request-IP %[src] |
374 | http-request set-header Host site2.local |
375 | + http-request set-header X-Cache-Request-IP %[src] |
376 | + http-check send hdr Host site2.local |
377 | + http-check send hdr User-Agent haproxy/httpchk |
378 | + option httpchk GET /check/ HTTP/1.0 |
379 | balance leastconn |
380 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
381 | |
382 | backend backend-site2-local |
383 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
384 | - option redispatch 1 |
385 | http-request set-header Host site2.local |
386 | + http-check send hdr Host site2.local |
387 | + http-check send hdr User-Agent haproxy/httpchk |
388 | + option httpchk GET /check/ HTTP/1.0 |
389 | + option redispatch 1 |
390 | balance leastconn |
391 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
392 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
393 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
394 | |
395 | backend backend-cached-site3-local |
396 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
397 | - http-request set-header X-Cache-Request-IP %[src] |
398 | http-request set-header Host site3.local |
399 | + http-request set-header X-Cache-Request-IP %[src] |
400 | + http-check send hdr Host site3.local |
401 | + http-check send hdr User-Agent haproxy/httpchk |
402 | + option httpchk HEAD / HTTP/1.0 |
403 | balance leastconn |
404 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
405 | |
406 | backend backend-site3-local |
407 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
408 | + http-request set-header Host site3.local |
409 | + http-check send hdr Host site3.local |
410 | + http-check send hdr User-Agent haproxy/httpchk |
411 | + option httpchk HEAD / HTTP/1.0 |
412 | option forwardfor except 127.0.0.1 192.168.1.1 |
413 | option forceclose |
414 | option redispatch 1 |
415 | - http-request set-header Host site3.local |
416 | balance leastconn |
417 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
418 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
419 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
420 | |
421 | backend backend-cached-site4-local |
422 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
423 | - http-request set-header X-Cache-Request-IP %[src] |
424 | http-request set-header Host site4.local |
425 | + http-request set-header X-Cache-Request-IP %[src] |
426 | + http-check send hdr Host site4.local |
427 | + http-check send hdr User-Agent haproxy/httpchk |
428 | + option httpchk HEAD / HTTP/1.0 |
429 | balance leastconn |
430 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
431 | |
432 | backend backend-cached-site5 |
433 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
434 | - http-request set-header X-Cache-Request-IP %[src] |
435 | http-request set-header Host site5.local |
436 | + http-request set-header X-Cache-Request-IP %[src] |
437 | + http-check send hdr Host site5.local |
438 | + http-check send hdr User-Agent haproxy/httpchk |
439 | + option httpchk HEAD / HTTP/1.0 |
440 | balance leastconn |
441 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
442 | |
443 | backend backend-site5 |
444 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
445 | - option redispatch 1 |
446 | http-request set-header Host site5.local |
447 | + http-check send hdr Host site5.local |
448 | + http-check send hdr User-Agent haproxy/httpchk |
449 | + option httpchk HEAD / HTTP/1.0 |
450 | + option redispatch 1 |
451 | balance leastconn |
452 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
453 | |
454 | backend backend-site5-2 |
455 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
456 | - option redispatch 1 |
457 | http-request set-header Host site5.local |
458 | + http-check send hdr Host site5.local |
459 | + http-check send hdr User-Agent haproxy/httpchk |
460 | + option httpchk HEAD / HTTP/1.0 |
461 | + option redispatch 1 |
462 | balance leastconn |
463 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
464 | |
465 | backend backend-cached-site6-local |
466 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
467 | - http-request set-header X-Cache-Request-IP %[src] |
468 | http-request set-header Host site6.local |
469 | + http-request set-header X-Cache-Request-IP %[src] |
470 | + http-check send hdr Host site6.local |
471 | + http-check send hdr User-Agent haproxy/httpchk |
472 | + option httpchk HEAD / HTTP/1.0 |
473 | balance leastconn |
474 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
475 | |
476 | backend backend-site6-local |
477 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
478 | - option redispatch 1 |
479 | http-request set-header Host site6.local |
480 | + http-check send hdr Host site6.local |
481 | + http-check send hdr User-Agent haproxy/httpchk |
482 | + option httpchk HEAD / HTTP/1.0 |
483 | + option redispatch 1 |
484 | balance leastconn |
485 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
486 | |
487 | backend backend-cached-site7-local |
488 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
489 | - http-request set-header X-Cache-Request-IP %[src] |
490 | http-request set-header Host site7.local |
491 | + http-request set-header X-Cache-Request-IP %[src] |
492 | + http-check send hdr Host site7.local |
493 | + http-check send hdr User-Agent haproxy/httpchk |
494 | + option httpchk HEAD / HTTP/1.0 |
495 | balance leastconn |
496 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
497 | |
498 | backend backend-site7-local |
499 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
500 | - option redispatch 1 |
501 | http-request set-header Host site7.local |
502 | + http-check send hdr Host site7.local |
503 | + http-check send hdr User-Agent haproxy/httpchk |
504 | + option httpchk HEAD / HTTP/1.0 |
505 | + option redispatch 1 |
506 | balance leastconn |
507 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
508 | |
509 | backend backend-cached-site8-local |
510 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
511 | - http-request set-header X-Cache-Request-IP %[src] |
512 | http-request set-header Host site8.local |
513 | + http-request set-header X-Cache-Request-IP %[src] |
514 | + http-check send hdr Host site8.local |
515 | + http-check send hdr User-Agent haproxy/httpchk |
516 | + option httpchk HEAD / HTTP/1.0 |
517 | balance leastconn |
518 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
519 | |
520 | backend backend-site8-local |
521 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
522 | - option redispatch 1 |
523 | http-request set-header Host site8.local |
524 | + http-check send hdr Host site8.local |
525 | + http-check send hdr User-Agent haproxy/httpchk |
526 | + option httpchk HEAD / HTTP/1.0 |
527 | + option redispatch 1 |
528 | balance leastconn |
529 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
530 | |
531 | backend backend-site8-local-2 |
532 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
533 | - option redispatch 1 |
534 | http-request set-header Host auth.site8.local |
535 | + http-check send hdr Host auth.site8.local |
536 | + http-check send hdr User-Agent haproxy/httpchk |
537 | + option httpchk HEAD / HTTP/1.0 |
538 | + option redispatch 1 |
539 | balance leastconn |
540 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
541 | |
542 | backend backend-cached-site9-local |
543 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
544 | - http-request set-header X-Cache-Request-IP %[src] |
545 | http-request set-header Host site9.local |
546 | + http-request set-header X-Cache-Request-IP %[src] |
547 | + http-check send hdr Host site9.local |
548 | + http-check send hdr User-Agent haproxy/httpchk |
549 | + option httpchk HEAD / HTTP/1.0 |
550 | balance leastconn |
551 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
552 | |
553 | backend backend-site9-local |
554 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
555 | - option redispatch 1 |
556 | http-request set-header Host site9.local |
557 | + http-check send hdr Host site9.local |
558 | + http-check send hdr User-Agent haproxy/httpchk |
559 | + option httpchk HEAD / HTTP/1.0 |
560 | + option redispatch 1 |
561 | balance leastconn |
562 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
563 | 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 |
564 | index 3a80145..1248506 100644 |
565 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt |
566 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt |
567 | @@ -95,25 +95,31 @@ listen site1-local-2 |
568 | default_backend backend-site1-local-2 |
569 | |
570 | backend backend-cached-site1-local |
571 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
572 | - http-request set-header X-Cache-Request-IP %[src] |
573 | http-request set-header Host site1.local |
574 | + http-request set-header X-Cache-Request-IP %[src] |
575 | + http-check send hdr Host site1.local |
576 | + http-check send hdr User-Agent haproxy/httpchk |
577 | + option httpchk HEAD / HTTP/1.0 |
578 | balance leastconn |
579 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400 |
580 | |
581 | backend backend-site1-local |
582 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
583 | + http-request set-header Host site1.local |
584 | + http-check send hdr Host site1.local |
585 | + http-check send hdr User-Agent haproxy/httpchk |
586 | + option httpchk HEAD / HTTP/1.0 |
587 | option allbackups |
588 | option redispatch 1 |
589 | - http-request set-header Host site1.local |
590 | balance leastconn |
591 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
592 | server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 200 |
593 | |
594 | backend backend-site1-local-2 |
595 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
596 | - option redispatch 1 |
597 | http-request set-header Host site1.local |
598 | + http-check send hdr Host site1.local |
599 | + http-check send hdr User-Agent haproxy/httpchk |
600 | + option httpchk HEAD / HTTP/1.0 |
601 | + option redispatch 1 |
602 | balance leastconn |
603 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
604 | server server_2 192.168.1.2:8080 check inter 5s rise 2 fall 5 maxconn 200 |
605 | 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 |
606 | index 0d34d81..6a2c85a 100644 |
607 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt |
608 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt |
609 | @@ -155,142 +155,180 @@ listen site9-local |
610 | default_backend backend-site9-local |
611 | |
612 | backend backend-cached-site1-local |
613 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
614 | - http-request set-header X-Cache-Request-IP %[src] |
615 | http-request set-header Host site1.local |
616 | + http-request set-header X-Cache-Request-IP %[src] |
617 | + http-check send hdr Host site1.local |
618 | + http-check send hdr User-Agent haproxy/httpchk |
619 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
620 | balance roundrobin |
621 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
622 | |
623 | backend backend-site1-local |
624 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
625 | - option redispatch 1 |
626 | http-request set-header Host site1.local |
627 | + http-check send hdr Host site1.local |
628 | + http-check send hdr User-Agent haproxy/httpchk |
629 | + option httpchk HEAD / HTTP/1.0 |
630 | + option redispatch 1 |
631 | balance roundrobin |
632 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
633 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
634 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
635 | |
636 | backend backend-cached-site2-local |
637 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
638 | - http-request set-header X-Cache-Request-IP %[src] |
639 | http-request set-header Host site2.local |
640 | + http-request set-header X-Cache-Request-IP %[src] |
641 | + http-check send hdr Host site2.local |
642 | + http-check send hdr User-Agent haproxy/httpchk |
643 | + option httpchk GET /check/ HTTP/1.0 |
644 | balance roundrobin |
645 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
646 | |
647 | backend backend-site2-local |
648 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
649 | - option redispatch 1 |
650 | http-request set-header Host site2.local |
651 | + http-check send hdr Host site2.local |
652 | + http-check send hdr User-Agent haproxy/httpchk |
653 | + option httpchk GET /check/ HTTP/1.0 |
654 | + option redispatch 1 |
655 | balance roundrobin |
656 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
657 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
658 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
659 | |
660 | backend backend-cached-site3-local |
661 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
662 | - http-request set-header X-Cache-Request-IP %[src] |
663 | http-request set-header Host site3.local |
664 | + http-request set-header X-Cache-Request-IP %[src] |
665 | + http-check send hdr Host site3.local |
666 | + http-check send hdr User-Agent haproxy/httpchk |
667 | + option httpchk HEAD / HTTP/1.0 |
668 | balance roundrobin |
669 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
670 | |
671 | backend backend-site3-local |
672 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
673 | + http-request set-header Host site3.local |
674 | + http-check send hdr Host site3.local |
675 | + http-check send hdr User-Agent haproxy/httpchk |
676 | + option httpchk HEAD / HTTP/1.0 |
677 | option forwardfor except 127.0.0.1 192.168.1.1 |
678 | option forceclose |
679 | option redispatch 1 |
680 | - http-request set-header Host site3.local |
681 | balance roundrobin |
682 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
683 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
684 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
685 | |
686 | backend backend-cached-site4-local |
687 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
688 | - http-request set-header X-Cache-Request-IP %[src] |
689 | http-request set-header Host site4.local |
690 | + http-request set-header X-Cache-Request-IP %[src] |
691 | + http-check send hdr Host site4.local |
692 | + http-check send hdr User-Agent haproxy/httpchk |
693 | + option httpchk HEAD / HTTP/1.0 |
694 | balance roundrobin |
695 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
696 | |
697 | backend backend-cached-site5 |
698 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
699 | - http-request set-header X-Cache-Request-IP %[src] |
700 | http-request set-header Host site5.local |
701 | + http-request set-header X-Cache-Request-IP %[src] |
702 | + http-check send hdr Host site5.local |
703 | + http-check send hdr User-Agent haproxy/httpchk |
704 | + option httpchk HEAD / HTTP/1.0 |
705 | balance roundrobin |
706 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
707 | |
708 | backend backend-site5 |
709 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
710 | - option redispatch 1 |
711 | http-request set-header Host site5.local |
712 | + http-check send hdr Host site5.local |
713 | + http-check send hdr User-Agent haproxy/httpchk |
714 | + option httpchk HEAD / HTTP/1.0 |
715 | + option redispatch 1 |
716 | balance roundrobin |
717 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
718 | |
719 | backend backend-site5-2 |
720 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
721 | - option redispatch 1 |
722 | http-request set-header Host site5.local |
723 | + http-check send hdr Host site5.local |
724 | + http-check send hdr User-Agent haproxy/httpchk |
725 | + option httpchk HEAD / HTTP/1.0 |
726 | + option redispatch 1 |
727 | balance roundrobin |
728 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
729 | |
730 | backend backend-cached-site6-local |
731 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
732 | - http-request set-header X-Cache-Request-IP %[src] |
733 | http-request set-header Host site6.local |
734 | + http-request set-header X-Cache-Request-IP %[src] |
735 | + http-check send hdr Host site6.local |
736 | + http-check send hdr User-Agent haproxy/httpchk |
737 | + option httpchk HEAD / HTTP/1.0 |
738 | balance roundrobin |
739 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
740 | |
741 | backend backend-site6-local |
742 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
743 | - option redispatch 1 |
744 | http-request set-header Host site6.local |
745 | + http-check send hdr Host site6.local |
746 | + http-check send hdr User-Agent haproxy/httpchk |
747 | + option httpchk HEAD / HTTP/1.0 |
748 | + option redispatch 1 |
749 | balance roundrobin |
750 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
751 | |
752 | backend backend-cached-site7-local |
753 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
754 | - http-request set-header X-Cache-Request-IP %[src] |
755 | http-request set-header Host site7.local |
756 | + http-request set-header X-Cache-Request-IP %[src] |
757 | + http-check send hdr Host site7.local |
758 | + http-check send hdr User-Agent haproxy/httpchk |
759 | + option httpchk HEAD / HTTP/1.0 |
760 | balance roundrobin |
761 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
762 | |
763 | backend backend-site7-local |
764 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
765 | - option redispatch 1 |
766 | http-request set-header Host site7.local |
767 | + http-check send hdr Host site7.local |
768 | + http-check send hdr User-Agent haproxy/httpchk |
769 | + option httpchk HEAD / HTTP/1.0 |
770 | + option redispatch 1 |
771 | balance roundrobin |
772 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
773 | |
774 | backend backend-cached-site8-local |
775 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
776 | - http-request set-header X-Cache-Request-IP %[src] |
777 | http-request set-header Host site8.local |
778 | + http-request set-header X-Cache-Request-IP %[src] |
779 | + http-check send hdr Host site8.local |
780 | + http-check send hdr User-Agent haproxy/httpchk |
781 | + option httpchk HEAD / HTTP/1.0 |
782 | balance roundrobin |
783 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
784 | |
785 | backend backend-site8-local |
786 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
787 | - option redispatch 1 |
788 | http-request set-header Host site8.local |
789 | + http-check send hdr Host site8.local |
790 | + http-check send hdr User-Agent haproxy/httpchk |
791 | + option httpchk HEAD / HTTP/1.0 |
792 | + option redispatch 1 |
793 | balance roundrobin |
794 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
795 | |
796 | backend backend-site8-local-2 |
797 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
798 | - option redispatch 1 |
799 | http-request set-header Host auth.site8.local |
800 | + http-check send hdr Host auth.site8.local |
801 | + http-check send hdr User-Agent haproxy/httpchk |
802 | + option httpchk HEAD / HTTP/1.0 |
803 | + option redispatch 1 |
804 | balance roundrobin |
805 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
806 | |
807 | backend backend-cached-site9-local |
808 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
809 | - http-request set-header X-Cache-Request-IP %[src] |
810 | http-request set-header Host site9.local |
811 | + http-request set-header X-Cache-Request-IP %[src] |
812 | + http-check send hdr Host site9.local |
813 | + http-check send hdr User-Agent haproxy/httpchk |
814 | + option httpchk HEAD / HTTP/1.0 |
815 | balance roundrobin |
816 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
817 | |
818 | backend backend-site9-local |
819 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
820 | - option redispatch 1 |
821 | http-request set-header Host site9.local |
822 | + http-check send hdr Host site9.local |
823 | + http-check send hdr User-Agent haproxy/httpchk |
824 | + option httpchk HEAD / HTTP/1.0 |
825 | + option redispatch 1 |
826 | balance roundrobin |
827 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
828 | 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 |
829 | index 5e49b0f..557a128 100644 |
830 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt |
831 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt |
832 | @@ -156,142 +156,180 @@ listen site9-local |
833 | default_backend backend-site9-local |
834 | |
835 | backend backend-cached-site1-local |
836 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
837 | - http-request set-header X-Cache-Request-IP %[src] |
838 | http-request set-header Host site1.local |
839 | + http-request set-header X-Cache-Request-IP %[src] |
840 | + http-check send hdr Host site1.local |
841 | + http-check send hdr User-Agent haproxy/httpchk |
842 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
843 | balance leastconn |
844 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
845 | |
846 | backend backend-site1-local |
847 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
848 | - option redispatch 1 |
849 | http-request set-header Host site1.local |
850 | + http-check send hdr Host site1.local |
851 | + http-check send hdr User-Agent haproxy/httpchk |
852 | + option httpchk HEAD / HTTP/1.0 |
853 | + option redispatch 1 |
854 | balance leastconn |
855 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
856 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
857 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
858 | |
859 | backend backend-cached-site2-local |
860 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
861 | - http-request set-header X-Cache-Request-IP %[src] |
862 | http-request set-header Host site2.local |
863 | + http-request set-header X-Cache-Request-IP %[src] |
864 | + http-check send hdr Host site2.local |
865 | + http-check send hdr User-Agent haproxy/httpchk |
866 | + option httpchk GET /check/ HTTP/1.0 |
867 | balance leastconn |
868 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
869 | |
870 | backend backend-site2-local |
871 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
872 | - option redispatch 1 |
873 | http-request set-header Host site2.local |
874 | + http-check send hdr Host site2.local |
875 | + http-check send hdr User-Agent haproxy/httpchk |
876 | + option httpchk GET /check/ HTTP/1.0 |
877 | + option redispatch 1 |
878 | balance leastconn |
879 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
880 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
881 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
882 | |
883 | backend backend-cached-site3-local |
884 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
885 | - http-request set-header X-Cache-Request-IP %[src] |
886 | http-request set-header Host site3.local |
887 | + http-request set-header X-Cache-Request-IP %[src] |
888 | + http-check send hdr Host site3.local |
889 | + http-check send hdr User-Agent haproxy/httpchk |
890 | + option httpchk HEAD / HTTP/1.0 |
891 | balance leastconn |
892 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
893 | |
894 | backend backend-site3-local |
895 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
896 | + http-request set-header Host site3.local |
897 | + http-check send hdr Host site3.local |
898 | + http-check send hdr User-Agent haproxy/httpchk |
899 | + option httpchk HEAD / HTTP/1.0 |
900 | option forwardfor except 127.0.0.1 192.168.1.1 |
901 | option forceclose |
902 | option redispatch 1 |
903 | - http-request set-header Host site3.local |
904 | balance leastconn |
905 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
906 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
907 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
908 | |
909 | backend backend-cached-site4-local |
910 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
911 | - http-request set-header X-Cache-Request-IP %[src] |
912 | http-request set-header Host site4.local |
913 | + http-request set-header X-Cache-Request-IP %[src] |
914 | + http-check send hdr Host site4.local |
915 | + http-check send hdr User-Agent haproxy/httpchk |
916 | + option httpchk HEAD / HTTP/1.0 |
917 | balance leastconn |
918 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
919 | |
920 | backend backend-cached-site5 |
921 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
922 | - http-request set-header X-Cache-Request-IP %[src] |
923 | http-request set-header Host site5.local |
924 | + http-request set-header X-Cache-Request-IP %[src] |
925 | + http-check send hdr Host site5.local |
926 | + http-check send hdr User-Agent haproxy/httpchk |
927 | + option httpchk HEAD / HTTP/1.0 |
928 | balance leastconn |
929 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
930 | |
931 | backend backend-site5 |
932 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
933 | - option redispatch 1 |
934 | http-request set-header Host site5.local |
935 | + http-check send hdr Host site5.local |
936 | + http-check send hdr User-Agent haproxy/httpchk |
937 | + option httpchk HEAD / HTTP/1.0 |
938 | + option redispatch 1 |
939 | balance leastconn |
940 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
941 | |
942 | backend backend-site5-2 |
943 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
944 | - option redispatch 1 |
945 | http-request set-header Host site5.local |
946 | + http-check send hdr Host site5.local |
947 | + http-check send hdr User-Agent haproxy/httpchk |
948 | + option httpchk HEAD / HTTP/1.0 |
949 | + option redispatch 1 |
950 | balance leastconn |
951 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
952 | |
953 | backend backend-cached-site6-local |
954 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
955 | - http-request set-header X-Cache-Request-IP %[src] |
956 | http-request set-header Host site6.local |
957 | + http-request set-header X-Cache-Request-IP %[src] |
958 | + http-check send hdr Host site6.local |
959 | + http-check send hdr User-Agent haproxy/httpchk |
960 | + option httpchk HEAD / HTTP/1.0 |
961 | balance leastconn |
962 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
963 | |
964 | backend backend-site6-local |
965 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
966 | - option redispatch 1 |
967 | http-request set-header Host site6.local |
968 | + http-check send hdr Host site6.local |
969 | + http-check send hdr User-Agent haproxy/httpchk |
970 | + option httpchk HEAD / HTTP/1.0 |
971 | + option redispatch 1 |
972 | balance leastconn |
973 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
974 | |
975 | backend backend-cached-site7-local |
976 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
977 | - http-request set-header X-Cache-Request-IP %[src] |
978 | http-request set-header Host site7.local |
979 | + http-request set-header X-Cache-Request-IP %[src] |
980 | + http-check send hdr Host site7.local |
981 | + http-check send hdr User-Agent haproxy/httpchk |
982 | + option httpchk HEAD / HTTP/1.0 |
983 | balance leastconn |
984 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
985 | |
986 | backend backend-site7-local |
987 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
988 | - option redispatch 1 |
989 | http-request set-header Host site7.local |
990 | + http-check send hdr Host site7.local |
991 | + http-check send hdr User-Agent haproxy/httpchk |
992 | + option httpchk HEAD / HTTP/1.0 |
993 | + option redispatch 1 |
994 | balance leastconn |
995 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
996 | |
997 | backend backend-cached-site8-local |
998 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
999 | - http-request set-header X-Cache-Request-IP %[src] |
1000 | http-request set-header Host site8.local |
1001 | + http-request set-header X-Cache-Request-IP %[src] |
1002 | + http-check send hdr Host site8.local |
1003 | + http-check send hdr User-Agent haproxy/httpchk |
1004 | + option httpchk HEAD / HTTP/1.0 |
1005 | balance leastconn |
1006 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
1007 | |
1008 | backend backend-site8-local |
1009 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
1010 | - option redispatch 1 |
1011 | http-request set-header Host site8.local |
1012 | + http-check send hdr Host site8.local |
1013 | + http-check send hdr User-Agent haproxy/httpchk |
1014 | + option httpchk HEAD / HTTP/1.0 |
1015 | + option redispatch 1 |
1016 | balance leastconn |
1017 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1018 | |
1019 | backend backend-site8-local-2 |
1020 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
1021 | - option redispatch 1 |
1022 | http-request set-header Host auth.site8.local |
1023 | + http-check send hdr Host auth.site8.local |
1024 | + http-check send hdr User-Agent haproxy/httpchk |
1025 | + option httpchk HEAD / HTTP/1.0 |
1026 | + option redispatch 1 |
1027 | balance leastconn |
1028 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
1029 | |
1030 | backend backend-cached-site9-local |
1031 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1032 | - http-request set-header X-Cache-Request-IP %[src] |
1033 | http-request set-header Host site9.local |
1034 | + http-request set-header X-Cache-Request-IP %[src] |
1035 | + http-check send hdr Host site9.local |
1036 | + http-check send hdr User-Agent haproxy/httpchk |
1037 | + option httpchk HEAD / HTTP/1.0 |
1038 | balance leastconn |
1039 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
1040 | |
1041 | backend backend-site9-local |
1042 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1043 | - option redispatch 1 |
1044 | http-request set-header Host site9.local |
1045 | + http-check send hdr Host site9.local |
1046 | + http-check send hdr User-Agent haproxy/httpchk |
1047 | + option httpchk HEAD / HTTP/1.0 |
1048 | + option redispatch 1 |
1049 | balance leastconn |
1050 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
1051 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt |
1052 | index 8cdfd8d..f232c44 100644 |
1053 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt |
1054 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt |
1055 | @@ -155,152 +155,190 @@ listen site9-local |
1056 | default_backend backend-site9-local |
1057 | |
1058 | backend backend-cached-site1-local |
1059 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1060 | - http-request set-header X-Cache-Request-IP %[src] |
1061 | http-request set-header Host site1.local |
1062 | + http-request set-header X-Cache-Request-IP %[src] |
1063 | + http-check send hdr Host site1.local |
1064 | + http-check send hdr User-Agent haproxy/httpchk |
1065 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
1066 | balance leastconn |
1067 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
1068 | |
1069 | backend backend-site1-local |
1070 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1071 | + http-request set-header Host site1.local |
1072 | + http-check send hdr Host site1.local |
1073 | + http-check send hdr User-Agent haproxy/httpchk |
1074 | + option httpchk HEAD / HTTP/1.0 |
1075 | retry-on all-retryable-errors |
1076 | option redispatch 1 |
1077 | - http-request set-header Host site1.local |
1078 | balance leastconn |
1079 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1080 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1081 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1082 | |
1083 | backend backend-cached-site2-local |
1084 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
1085 | - http-request set-header X-Cache-Request-IP %[src] |
1086 | http-request set-header Host site2.local |
1087 | + http-request set-header X-Cache-Request-IP %[src] |
1088 | + http-check send hdr Host site2.local |
1089 | + http-check send hdr User-Agent haproxy/httpchk |
1090 | + option httpchk GET /check/ HTTP/1.0 |
1091 | balance leastconn |
1092 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
1093 | |
1094 | backend backend-site2-local |
1095 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
1096 | + http-request set-header Host site2.local |
1097 | + http-check send hdr Host site2.local |
1098 | + http-check send hdr User-Agent haproxy/httpchk |
1099 | + option httpchk GET /check/ HTTP/1.0 |
1100 | retry-on all-retryable-errors |
1101 | option redispatch 1 |
1102 | - http-request set-header Host site2.local |
1103 | balance leastconn |
1104 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1105 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1106 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1107 | |
1108 | backend backend-cached-site3-local |
1109 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1110 | - http-request set-header X-Cache-Request-IP %[src] |
1111 | http-request set-header Host site3.local |
1112 | + http-request set-header X-Cache-Request-IP %[src] |
1113 | + http-check send hdr Host site3.local |
1114 | + http-check send hdr User-Agent haproxy/httpchk |
1115 | + option httpchk HEAD / HTTP/1.0 |
1116 | balance leastconn |
1117 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
1118 | |
1119 | backend backend-site3-local |
1120 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1121 | + http-request set-header Host site3.local |
1122 | + http-check send hdr Host site3.local |
1123 | + http-check send hdr User-Agent haproxy/httpchk |
1124 | + option httpchk HEAD / HTTP/1.0 |
1125 | option forwardfor except 127.0.0.1 192.168.1.1 |
1126 | option forceclose |
1127 | retry-on all-retryable-errors |
1128 | option redispatch 1 |
1129 | - http-request set-header Host site3.local |
1130 | balance leastconn |
1131 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1132 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1133 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1134 | |
1135 | backend backend-cached-site4-local |
1136 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
1137 | - http-request set-header X-Cache-Request-IP %[src] |
1138 | http-request set-header Host site4.local |
1139 | + http-request set-header X-Cache-Request-IP %[src] |
1140 | + http-check send hdr Host site4.local |
1141 | + http-check send hdr User-Agent haproxy/httpchk |
1142 | + option httpchk HEAD / HTTP/1.0 |
1143 | balance leastconn |
1144 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
1145 | |
1146 | backend backend-cached-site5 |
1147 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1148 | - http-request set-header X-Cache-Request-IP %[src] |
1149 | http-request set-header Host site5.local |
1150 | + http-request set-header X-Cache-Request-IP %[src] |
1151 | + http-check send hdr Host site5.local |
1152 | + http-check send hdr User-Agent haproxy/httpchk |
1153 | + option httpchk HEAD / HTTP/1.0 |
1154 | balance leastconn |
1155 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
1156 | |
1157 | backend backend-site5 |
1158 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1159 | + http-request set-header Host site5.local |
1160 | + http-check send hdr Host site5.local |
1161 | + http-check send hdr User-Agent haproxy/httpchk |
1162 | + option httpchk HEAD / HTTP/1.0 |
1163 | retry-on all-retryable-errors |
1164 | option redispatch 1 |
1165 | - http-request set-header Host site5.local |
1166 | balance leastconn |
1167 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1168 | |
1169 | backend backend-site5-2 |
1170 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1171 | + http-request set-header Host site5.local |
1172 | + http-check send hdr Host site5.local |
1173 | + http-check send hdr User-Agent haproxy/httpchk |
1174 | + option httpchk HEAD / HTTP/1.0 |
1175 | retry-on all-retryable-errors |
1176 | option redispatch 1 |
1177 | - http-request set-header Host site5.local |
1178 | balance leastconn |
1179 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1180 | |
1181 | backend backend-cached-site6-local |
1182 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
1183 | - http-request set-header X-Cache-Request-IP %[src] |
1184 | http-request set-header Host site6.local |
1185 | + http-request set-header X-Cache-Request-IP %[src] |
1186 | + http-check send hdr Host site6.local |
1187 | + http-check send hdr User-Agent haproxy/httpchk |
1188 | + option httpchk HEAD / HTTP/1.0 |
1189 | balance leastconn |
1190 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
1191 | |
1192 | backend backend-site6-local |
1193 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
1194 | + http-request set-header Host site6.local |
1195 | + http-check send hdr Host site6.local |
1196 | + http-check send hdr User-Agent haproxy/httpchk |
1197 | + option httpchk HEAD / HTTP/1.0 |
1198 | retry-on all-retryable-errors |
1199 | option redispatch 1 |
1200 | - http-request set-header Host site6.local |
1201 | balance leastconn |
1202 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
1203 | |
1204 | backend backend-cached-site7-local |
1205 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
1206 | - http-request set-header X-Cache-Request-IP %[src] |
1207 | http-request set-header Host site7.local |
1208 | + http-request set-header X-Cache-Request-IP %[src] |
1209 | + http-check send hdr Host site7.local |
1210 | + http-check send hdr User-Agent haproxy/httpchk |
1211 | + option httpchk HEAD / HTTP/1.0 |
1212 | balance leastconn |
1213 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
1214 | |
1215 | backend backend-site7-local |
1216 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
1217 | + http-request set-header Host site7.local |
1218 | + http-check send hdr Host site7.local |
1219 | + http-check send hdr User-Agent haproxy/httpchk |
1220 | + option httpchk HEAD / HTTP/1.0 |
1221 | retry-on all-retryable-errors |
1222 | option redispatch 1 |
1223 | - http-request set-header Host site7.local |
1224 | balance leastconn |
1225 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1226 | |
1227 | backend backend-cached-site8-local |
1228 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
1229 | - http-request set-header X-Cache-Request-IP %[src] |
1230 | http-request set-header Host site8.local |
1231 | + http-request set-header X-Cache-Request-IP %[src] |
1232 | + http-check send hdr Host site8.local |
1233 | + http-check send hdr User-Agent haproxy/httpchk |
1234 | + option httpchk HEAD / HTTP/1.0 |
1235 | balance leastconn |
1236 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
1237 | |
1238 | backend backend-site8-local |
1239 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
1240 | + http-request set-header Host site8.local |
1241 | + http-check send hdr Host site8.local |
1242 | + http-check send hdr User-Agent haproxy/httpchk |
1243 | + option httpchk HEAD / HTTP/1.0 |
1244 | retry-on all-retryable-errors |
1245 | option redispatch 1 |
1246 | - http-request set-header Host site8.local |
1247 | balance leastconn |
1248 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1249 | |
1250 | backend backend-site8-local-2 |
1251 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
1252 | + http-request set-header Host auth.site8.local |
1253 | + http-check send hdr Host auth.site8.local |
1254 | + http-check send hdr User-Agent haproxy/httpchk |
1255 | + option httpchk HEAD / HTTP/1.0 |
1256 | retry-on all-retryable-errors |
1257 | option redispatch 1 |
1258 | - http-request set-header Host auth.site8.local |
1259 | balance leastconn |
1260 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
1261 | |
1262 | backend backend-cached-site9-local |
1263 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1264 | - http-request set-header X-Cache-Request-IP %[src] |
1265 | http-request set-header Host site9.local |
1266 | + http-request set-header X-Cache-Request-IP %[src] |
1267 | + http-check send hdr Host site9.local |
1268 | + http-check send hdr User-Agent haproxy/httpchk |
1269 | + option httpchk HEAD / HTTP/1.0 |
1270 | balance leastconn |
1271 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
1272 | |
1273 | backend backend-site9-local |
1274 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1275 | + http-request set-header Host site9.local |
1276 | + http-check send hdr Host site9.local |
1277 | + http-check send hdr User-Agent haproxy/httpchk |
1278 | + option httpchk HEAD / HTTP/1.0 |
1279 | retry-on all-retryable-errors |
1280 | option redispatch 1 |
1281 | - http-request set-header Host site9.local |
1282 | balance leastconn |
1283 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
1284 | 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 |
1285 | index 150724d..d25cb73 100644 |
1286 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt |
1287 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt |
1288 | @@ -90,16 +90,20 @@ listen site1-local |
1289 | default_backend backend-site1-local |
1290 | |
1291 | backend backend-cached-site1-local |
1292 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1293 | - http-request set-header X-Cache-Request-IP %[src] |
1294 | http-request set-header Host site1.local |
1295 | + http-request set-header X-Cache-Request-IP %[src] |
1296 | + http-check send hdr Host site1.local |
1297 | + http-check send hdr User-Agent haproxy/httpchk |
1298 | + option httpchk HEAD / HTTP/1.0 |
1299 | balance leastconn |
1300 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400 |
1301 | |
1302 | backend backend-site1-local |
1303 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1304 | - option redispatch 1 |
1305 | http-request set-header Host site1.local |
1306 | + http-check send hdr Host site1.local |
1307 | + http-check send hdr User-Agent haproxy/httpchk |
1308 | + option httpchk HEAD / HTTP/1.0 |
1309 | + option redispatch 1 |
1310 | balance leastconn |
1311 | server-template server_1_ 2 _http._tcp.us.archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200 |
1312 | server-template server_2_ 2 _http._tcp.gb.archive.ubuntu.com:80 backup resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200 |
1313 | diff --git a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt |
1314 | index ea47e02..0e56720 100644 |
1315 | --- a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt |
1316 | +++ b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt |
1317 | @@ -1,68 +1,88 @@ |
1318 | |
1319 | backend backend-site1-local |
1320 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1321 | http-request set-header Host site1.local |
1322 | + http-check send hdr Host site1.local |
1323 | + http-check send hdr User-Agent haproxy/httpchk |
1324 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
1325 | balance leastconn |
1326 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1327 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1328 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1329 | |
1330 | backend backend-site2-local |
1331 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
1332 | http-request set-header Host site2.local |
1333 | + http-check send hdr Host site2.local |
1334 | + http-check send hdr User-Agent haproxy/httpchk |
1335 | + option httpchk GET /check/ HTTP/1.0 |
1336 | balance leastconn |
1337 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1338 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1339 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1340 | |
1341 | backend backend-site3-local |
1342 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1343 | + http-request set-header Host site3.local |
1344 | + http-check send hdr Host site3.local |
1345 | + http-check send hdr User-Agent haproxy/httpchk |
1346 | + option httpchk HEAD / HTTP/1.0 |
1347 | option forwardfor except 127.0.0.1 192.168.1.1 |
1348 | option forceclose |
1349 | - http-request set-header Host site3.local |
1350 | balance leastconn |
1351 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1352 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1353 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1354 | |
1355 | backend backend-site5 |
1356 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1357 | http-request set-header Host site5.local |
1358 | + http-check send hdr Host site5.local |
1359 | + http-check send hdr User-Agent haproxy/httpchk |
1360 | + option httpchk HEAD / HTTP/1.0 |
1361 | balance leastconn |
1362 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1363 | |
1364 | backend backend-site5-2 |
1365 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1366 | http-request set-header Host site5.local |
1367 | + http-check send hdr Host site5.local |
1368 | + http-check send hdr User-Agent haproxy/httpchk |
1369 | + option httpchk HEAD / HTTP/1.0 |
1370 | balance leastconn |
1371 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1372 | |
1373 | backend backend-site6-local |
1374 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
1375 | http-request set-header Host site6.local |
1376 | + http-check send hdr Host site6.local |
1377 | + http-check send hdr User-Agent haproxy/httpchk |
1378 | + option httpchk HEAD / HTTP/1.0 |
1379 | balance leastconn |
1380 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
1381 | |
1382 | backend backend-site7-local |
1383 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
1384 | http-request set-header Host site7.local |
1385 | + http-check send hdr Host site7.local |
1386 | + http-check send hdr User-Agent haproxy/httpchk |
1387 | + option httpchk HEAD / HTTP/1.0 |
1388 | balance leastconn |
1389 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1390 | |
1391 | backend backend-site8-local |
1392 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
1393 | http-request set-header Host site8.local |
1394 | + http-check send hdr Host site8.local |
1395 | + http-check send hdr User-Agent haproxy/httpchk |
1396 | + option httpchk HEAD / HTTP/1.0 |
1397 | balance leastconn |
1398 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1399 | |
1400 | backend backend-site8-local-2 |
1401 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
1402 | http-request set-header Host auth.site8.local |
1403 | + http-check send hdr Host auth.site8.local |
1404 | + http-check send hdr User-Agent haproxy/httpchk |
1405 | + option httpchk HEAD / HTTP/1.0 |
1406 | balance leastconn |
1407 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
1408 | |
1409 | backend backend-site9-local |
1410 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1411 | http-request set-header Host site9.local |
1412 | + http-check send hdr Host site9.local |
1413 | + http-check send hdr User-Agent haproxy/httpchk |
1414 | + option httpchk HEAD / HTTP/1.0 |
1415 | balance leastconn |
1416 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
1417 | diff --git a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt |
1418 | index e5812ab..1c8ea3c 100644 |
1419 | --- a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt |
1420 | +++ b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt |
1421 | @@ -1,6 +1,8 @@ |
1422 | |
1423 | backend backend-site1-local |
1424 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1425 | http-request set-header Host site1.local |
1426 | + http-check send hdr Host site1.local |
1427 | + http-check send hdr User-Agent haproxy/httpchk |
1428 | + option httpchk HEAD / HTTP/1.0 |
1429 | balance leastconn |
1430 | server server_1 archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200 |
1431 | diff --git a/tests/unit/files/haproxy_config_rendered_test_output.txt b/tests/unit/files/haproxy_config_rendered_test_output.txt |
1432 | index 1b15c14..650b4fd 100644 |
1433 | --- a/tests/unit/files/haproxy_config_rendered_test_output.txt |
1434 | +++ b/tests/unit/files/haproxy_config_rendered_test_output.txt |
1435 | @@ -106,69 +106,89 @@ listen combined-444 |
1436 | use_backend backend-site8-local if { hdr(Host) -i site8.local } |
1437 | |
1438 | backend backend-site1-local |
1439 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1440 | http-request set-header Host site1.local |
1441 | + http-check send hdr Host site1.local |
1442 | + http-check send hdr User-Agent haproxy/httpchk |
1443 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
1444 | balance leastconn |
1445 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1446 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1447 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1448 | |
1449 | backend backend-site2-local |
1450 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
1451 | http-request set-header Host site2.local |
1452 | + http-check send hdr Host site2.local |
1453 | + http-check send hdr User-Agent haproxy/httpchk |
1454 | + option httpchk GET /check/ HTTP/1.0 |
1455 | balance leastconn |
1456 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1457 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1458 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1459 | |
1460 | backend backend-site3-local |
1461 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1462 | + http-request set-header Host site3.local |
1463 | + http-check send hdr Host site3.local |
1464 | + http-check send hdr User-Agent haproxy/httpchk |
1465 | + option httpchk HEAD / HTTP/1.0 |
1466 | option forwardfor except 127.0.0.1 192.168.1.1 |
1467 | option forceclose |
1468 | - http-request set-header Host site3.local |
1469 | balance leastconn |
1470 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1471 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1472 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1473 | |
1474 | backend backend-site5 |
1475 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1476 | http-request set-header Host site5.local |
1477 | + http-check send hdr Host site5.local |
1478 | + http-check send hdr User-Agent haproxy/httpchk |
1479 | + option httpchk HEAD / HTTP/1.0 |
1480 | balance leastconn |
1481 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1482 | |
1483 | backend backend-site5-2 |
1484 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1485 | http-request set-header Host site5.local |
1486 | + http-check send hdr Host site5.local |
1487 | + http-check send hdr User-Agent haproxy/httpchk |
1488 | + option httpchk HEAD / HTTP/1.0 |
1489 | balance leastconn |
1490 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1491 | |
1492 | backend backend-site6-local |
1493 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
1494 | http-request set-header Host site6.local |
1495 | + http-check send hdr Host site6.local |
1496 | + http-check send hdr User-Agent haproxy/httpchk |
1497 | + option httpchk HEAD / HTTP/1.0 |
1498 | balance leastconn |
1499 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
1500 | |
1501 | backend backend-site7-local |
1502 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
1503 | http-request set-header Host site7.local |
1504 | + http-check send hdr Host site7.local |
1505 | + http-check send hdr User-Agent haproxy/httpchk |
1506 | + option httpchk HEAD / HTTP/1.0 |
1507 | balance leastconn |
1508 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1509 | |
1510 | backend backend-site8-local |
1511 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
1512 | http-request set-header Host site8.local |
1513 | + http-check send hdr Host site8.local |
1514 | + http-check send hdr User-Agent haproxy/httpchk |
1515 | + option httpchk HEAD / HTTP/1.0 |
1516 | balance leastconn |
1517 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1518 | |
1519 | backend backend-site8-local-2 |
1520 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
1521 | http-request set-header Host auth.site8.local |
1522 | + http-check send hdr Host auth.site8.local |
1523 | + http-check send hdr User-Agent haproxy/httpchk |
1524 | + option httpchk HEAD / HTTP/1.0 |
1525 | balance leastconn |
1526 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
1527 | |
1528 | backend backend-site9-local |
1529 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1530 | http-request set-header Host site9.local |
1531 | + http-check send hdr Host site9.local |
1532 | + http-check send hdr User-Agent haproxy/httpchk |
1533 | + option httpchk HEAD / HTTP/1.0 |
1534 | balance leastconn |
1535 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
1536 | diff --git a/tests/unit/files/haproxy_config_rendered_test_output2.txt b/tests/unit/files/haproxy_config_rendered_test_output2.txt |
1537 | index 1009f68..44ecadc 100644 |
1538 | --- a/tests/unit/files/haproxy_config_rendered_test_output2.txt |
1539 | +++ b/tests/unit/files/haproxy_config_rendered_test_output2.txt |
1540 | @@ -106,69 +106,89 @@ listen combined-444 |
1541 | use_backend backend-site8-local if { hdr(Host) -i site8.local } |
1542 | |
1543 | backend backend-site1-local |
1544 | - option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1545 | http-request set-header Host site1.local |
1546 | + http-check send hdr Host site1.local |
1547 | + http-check send hdr User-Agent haproxy/httpchk |
1548 | + option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0 |
1549 | balance leastconn |
1550 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1551 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1552 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1553 | |
1554 | backend backend-site2-local |
1555 | - option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
1556 | http-request set-header Host site2.local |
1557 | + http-check send hdr Host site2.local |
1558 | + http-check send hdr User-Agent haproxy/httpchk |
1559 | + option httpchk GET /check/ HTTP/1.0 |
1560 | balance leastconn |
1561 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1562 | server server_2 127.0.1.11:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1563 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1564 | |
1565 | backend backend-site3-local |
1566 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1567 | + http-request set-header Host site3.local |
1568 | + http-check send hdr Host site3.local |
1569 | + http-check send hdr User-Agent haproxy/httpchk |
1570 | + option httpchk HEAD / HTTP/1.0 |
1571 | option forwardfor except 127.0.0.1 192.168.1.1 |
1572 | option forceclose |
1573 | - http-request set-header Host site3.local |
1574 | balance leastconn |
1575 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1576 | server server_2 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1577 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
1578 | |
1579 | backend backend-site5 |
1580 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1581 | http-request set-header Host site5.local |
1582 | + http-check send hdr Host site5.local |
1583 | + http-check send hdr User-Agent haproxy/httpchk |
1584 | + option httpchk HEAD / HTTP/1.0 |
1585 | balance leastconn |
1586 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1587 | |
1588 | backend backend-site5-2 |
1589 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
1590 | http-request set-header Host site5.local |
1591 | + http-check send hdr Host site5.local |
1592 | + http-check send hdr User-Agent haproxy/httpchk |
1593 | + option httpchk HEAD / HTTP/1.0 |
1594 | balance leastconn |
1595 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
1596 | |
1597 | backend backend-site6-local |
1598 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
1599 | http-request set-header Host site6.local |
1600 | + http-check send hdr Host site6.local |
1601 | + http-check send hdr User-Agent haproxy/httpchk |
1602 | + option httpchk HEAD / HTTP/1.0 |
1603 | balance leastconn |
1604 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
1605 | |
1606 | backend backend-site7-local |
1607 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
1608 | http-request set-header Host site7.local |
1609 | + http-check send hdr Host site7.local |
1610 | + http-check send hdr User-Agent haproxy/httpchk |
1611 | + option httpchk HEAD / HTTP/1.0 |
1612 | balance leastconn |
1613 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1614 | |
1615 | backend backend-site8-local |
1616 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
1617 | http-request set-header Host site8.local |
1618 | + http-check send hdr Host site8.local |
1619 | + http-check send hdr User-Agent haproxy/httpchk |
1620 | + option httpchk HEAD / HTTP/1.0 |
1621 | balance leastconn |
1622 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1623 | |
1624 | backend backend-site8-local-2 |
1625 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
1626 | http-request set-header Host auth.site8.local |
1627 | + http-check send hdr Host auth.site8.local |
1628 | + http-check send hdr User-Agent haproxy/httpchk |
1629 | + option httpchk HEAD / HTTP/1.0 |
1630 | balance leastconn |
1631 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
1632 | |
1633 | backend backend-site9-local |
1634 | - option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
1635 | http-request set-header Host site9.local |
1636 | + http-check send hdr Host site9.local |
1637 | + http-check send hdr User-Agent haproxy/httpchk |
1638 | + option httpchk HEAD / HTTP/1.0 |
1639 | balance leastconn |
1640 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.