Merge ~hloeung/content-cache-charm:cleanup into content-cache-charm:master

Proposed by Haw Loeung
Status: Merged
Approved by: Paul Collins
Approved revision: 0d24b8704846dfe0998266d139f87a8334bc868c
Merged at revision: e96904cf3b0cce2eb8052759eb105c681034ef73
Proposed branch: ~hloeung/content-cache-charm:cleanup
Merge into: content-cache-charm:master
Diff against target: 1510 lines (+143/-418)
15 files modified
lib/haproxy.py (+7/-13)
reactive/content_cache.py (+1/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+2/-6)
tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+2/-6)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+3/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+19/-57)
tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+2/-6)
tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt (+10/-30)
tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output2.txt (+1/-3)
tests/unit/files/haproxy_config_rendered_test_output.txt (+10/-30)
tests/unit/files/haproxy_config_rendered_test_output2.txt (+10/-30)
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+397708@code.launchpad.net

Commit message

Revert "Use 'http-check send hdr' instead of adding headers at end of httpchk version"

To post a comment you must log in.
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

Change successfully merged at revision e96904cf3b0cce2eb8052759eb105c681034ef73

Preview Diff

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

Subscribers

People subscribed via source and target branches