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