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

Proposed by Haw Loeung
Status: Merged
Approved by: Paul Collins
Approved revision: 2b3f15b2359e390d6d86ae0c790fbb14c15fd15d
Merged at revision: 9e1d668e53ff85b458917fc955774f2ab45fcd0e
Proposed branch: ~hloeung/content-cache-charm:cleanup
Merge into: content-cache-charm:master
Diff against target: 496 lines (+53/-51)
11 files modified
files/nginx-logging-format.conf (+1/-1)
reactive/content_cache.py (+3/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+9/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+1/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+1/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+9/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+1/-1)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+9/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+9/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+9/-9)
tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+1/-1)
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+397710@code.launchpad.net

Commit message

Back to X-Forwarded-For as some things expect it to be this (e.g. Moin

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

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

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

Change successfully merged at revision 9e1d668e53ff85b458917fc955774f2ab45fcd0e

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/files/nginx-logging-format.conf b/files/nginx-logging-format.conf
index b9df464..a646743 100644
--- a/files/nginx-logging-format.conf
+++ b/files/nginx-logging-format.conf
@@ -1,4 +1,4 @@
1log_format content_cache '$http_x_cache_request_ip - $remote_user [$time_local] '1log_format content_cache '$http_x_forwarded_for - $remote_user [$time_local] '
2 '"$request" $status $bytes_sent '2 '"$request" $status $bytes_sent '
3 '"$http_referer" "$http_user_agent" $request_time '3 '"$http_referer" "$http_user_agent" $request_time '
4 '$upstream_cache_status $upstream_response_time '4 '$upstream_cache_status $upstream_response_time '
diff --git a/reactive/content_cache.py b/reactive/content_cache.py
index 9f95727..a215f62 100644
--- a/reactive/content_cache.py
+++ b/reactive/content_cache.py
@@ -281,7 +281,9 @@ def configure_haproxy(): # NOQA: C901 LP#1825084
281 # Also, for caching layer, we want higher fall count as it's less281 # Also, for caching layer, we want higher fall count as it's less
282 # likely the caching layer is down, 2 mins here (inter * fall).282 # likely the caching layer is down, 2 mins here (inter * fall).
283 new_cached_loc_conf['backend-fall-count'] = 60283 new_cached_loc_conf['backend-fall-count'] = 60
284 new_cached_loc_conf['backend-options'] = ['http-request set-header X-Cache-Request-IP %[src]']284 # Rather than enable haproxy's 'option forwardfor' we want to replace
285 # the X-F-F header in case it's spoofed.
286 new_cached_loc_conf['backend-options'] = ['http-request set-header X-Forwarded-For %[src]']
285287
286 # No backends288 # No backends
287 if not site_conf['locations'][location].get('backends'):289 if not site_conf['locations'][location].get('backends'):
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
index 658b0d1..b7bb481 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
@@ -157,7 +157,7 @@ listen site9-local
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
159 http-request set-header Host site1.local159 http-request set-header Host site1.local
160 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Forwarded-For %[src]
161 balance leastconn161 balance leastconn
162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
163163
@@ -173,7 +173,7 @@ backend backend-site1-local
173backend backend-cached-site2-local173backend backend-cached-site2-local
174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
175 http-request set-header Host site2.local175 http-request set-header Host site2.local
176 http-request set-header X-Cache-Request-IP %[src]176 http-request set-header X-Forwarded-For %[src]
177 balance leastconn177 balance leastconn
178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
179179
@@ -189,7 +189,7 @@ backend backend-site2-local
189backend backend-cached-site3-local189backend backend-cached-site3-local
190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
191 http-request set-header Host site3.local191 http-request set-header Host site3.local
192 http-request set-header X-Cache-Request-IP %[src]192 http-request set-header X-Forwarded-For %[src]
193 balance leastconn193 balance leastconn
194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
195195
@@ -207,14 +207,14 @@ backend backend-site3-local
207backend backend-cached-site4-local207backend backend-cached-site4-local
208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
209 http-request set-header Host site4.local209 http-request set-header Host site4.local
210 http-request set-header X-Cache-Request-IP %[src]210 http-request set-header X-Forwarded-For %[src]
211 balance leastconn211 balance leastconn
212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
213213
214backend backend-cached-site5214backend backend-cached-site5
215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
216 http-request set-header Host site5.local216 http-request set-header Host site5.local
217 http-request set-header X-Cache-Request-IP %[src]217 http-request set-header X-Forwarded-For %[src]
218 balance leastconn218 balance leastconn
219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
220220
@@ -235,7 +235,7 @@ backend backend-site5-2
235backend backend-cached-site6-local235backend backend-cached-site6-local
236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
237 http-request set-header Host site6.local237 http-request set-header Host site6.local
238 http-request set-header X-Cache-Request-IP %[src]238 http-request set-header X-Forwarded-For %[src]
239 balance leastconn239 balance leastconn
240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
241241
@@ -249,7 +249,7 @@ backend backend-site6-local
249backend backend-cached-site7-local249backend backend-cached-site7-local
250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
251 http-request set-header Host site7.local251 http-request set-header Host site7.local
252 http-request set-header X-Cache-Request-IP %[src]252 http-request set-header X-Forwarded-For %[src]
253 balance leastconn253 balance leastconn
254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
255255
@@ -263,7 +263,7 @@ backend backend-site7-local
263backend backend-cached-site8-local263backend backend-cached-site8-local
264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
265 http-request set-header Host site8.local265 http-request set-header Host site8.local
266 http-request set-header X-Cache-Request-IP %[src]266 http-request set-header X-Forwarded-For %[src]
267 balance leastconn267 balance leastconn
268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
269269
@@ -284,7 +284,7 @@ backend backend-site8-local-2
284backend backend-cached-site9-local284backend backend-cached-site9-local
285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
286 http-request set-header Host site9.local286 http-request set-header Host site9.local
287 http-request set-header X-Cache-Request-IP %[src]287 http-request set-header X-Forwarded-For %[src]
288 balance leastconn288 balance leastconn
289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
290290
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
index 7931e5e..a571e92 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt
@@ -92,7 +92,7 @@ listen site1-local
92backend backend-cached-site1-local92backend backend-cached-site1-local
93 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk93 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
94 http-request set-header Host site1.local94 http-request set-header Host site1.local
95 http-request set-header X-Cache-Request-IP %[src]95 http-request set-header X-Forwarded-For %[src]
96 balance leastconn96 balance leastconn
97 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 20097 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200
9898
diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
index e8536e0..bd66f8d 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt
@@ -98,7 +98,7 @@ listen site1-local
98backend backend-cached-site1-local98backend backend-cached-site1-local
99 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk99 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
100 http-request set-header Host site1.local100 http-request set-header Host site1.local
101 http-request set-header X-Cache-Request-IP %[src]101 http-request set-header X-Forwarded-For %[src]
102 balance leastconn102 balance leastconn
103 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200103 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200
104104
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
index 47c5663..d28fd68 100644
--- 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
@@ -157,7 +157,7 @@ listen site9-local
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
159 http-request set-header Host site1.local159 http-request set-header Host site1.local
160 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Forwarded-For %[src]
161 balance leastconn161 balance leastconn
162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
163163
@@ -173,7 +173,7 @@ backend backend-site1-local
173backend backend-cached-site2-local173backend backend-cached-site2-local
174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
175 http-request set-header Host site2.local175 http-request set-header Host site2.local
176 http-request set-header X-Cache-Request-IP %[src]176 http-request set-header X-Forwarded-For %[src]
177 balance leastconn177 balance leastconn
178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
179179
@@ -189,7 +189,7 @@ backend backend-site2-local
189backend backend-cached-site3-local189backend backend-cached-site3-local
190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
191 http-request set-header Host site3.local191 http-request set-header Host site3.local
192 http-request set-header X-Cache-Request-IP %[src]192 http-request set-header X-Forwarded-For %[src]
193 balance leastconn193 balance leastconn
194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
195195
@@ -207,14 +207,14 @@ backend backend-site3-local
207backend backend-cached-site4-local207backend backend-cached-site4-local
208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
209 http-request set-header Host site4.local209 http-request set-header Host site4.local
210 http-request set-header X-Cache-Request-IP %[src]210 http-request set-header X-Forwarded-For %[src]
211 balance leastconn211 balance leastconn
212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
213213
214backend backend-cached-site5214backend backend-cached-site5
215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
216 http-request set-header Host site5.local216 http-request set-header Host site5.local
217 http-request set-header X-Cache-Request-IP %[src]217 http-request set-header X-Forwarded-For %[src]
218 balance leastconn218 balance leastconn
219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
220220
@@ -235,7 +235,7 @@ backend backend-site5-2
235backend backend-cached-site6-local235backend backend-cached-site6-local
236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
237 http-request set-header Host site6.local237 http-request set-header Host site6.local
238 http-request set-header X-Cache-Request-IP %[src]238 http-request set-header X-Forwarded-For %[src]
239 balance leastconn239 balance leastconn
240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
241241
@@ -249,7 +249,7 @@ backend backend-site6-local
249backend backend-cached-site7-local249backend backend-cached-site7-local
250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
251 http-request set-header Host site7.local251 http-request set-header Host site7.local
252 http-request set-header X-Cache-Request-IP %[src]252 http-request set-header X-Forwarded-For %[src]
253 balance leastconn253 balance leastconn
254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
255255
@@ -263,7 +263,7 @@ backend backend-site7-local
263backend backend-cached-site8-local263backend backend-cached-site8-local
264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
265 http-request set-header Host site8.local265 http-request set-header Host site8.local
266 http-request set-header X-Cache-Request-IP %[src]266 http-request set-header X-Forwarded-For %[src]
267 balance leastconn267 balance leastconn
268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
269269
@@ -284,7 +284,7 @@ backend backend-site8-local-2
284backend backend-cached-site9-local284backend backend-cached-site9-local
285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
286 http-request set-header Host site9.local286 http-request set-header Host site9.local
287 http-request set-header X-Cache-Request-IP %[src]287 http-request set-header X-Forwarded-For %[src]
288 balance leastconn288 balance leastconn
289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
290290
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
index b110384..194dd4c 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt
@@ -97,7 +97,7 @@ listen site1-local-2
97backend backend-cached-site1-local97backend backend-cached-site1-local
98 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk98 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
99 http-request set-header Host site1.local99 http-request set-header Host site1.local
100 http-request set-header X-Cache-Request-IP %[src]100 http-request set-header X-Forwarded-For %[src]
101 balance leastconn101 balance leastconn
102 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400102 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400
103103
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
index 8ad76cb..09d9c9a 100644
--- 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
@@ -157,7 +157,7 @@ listen site9-local
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
159 http-request set-header Host site1.local159 http-request set-header Host site1.local
160 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Forwarded-For %[src]
161 balance roundrobin161 balance roundrobin
162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
163163
@@ -173,7 +173,7 @@ backend backend-site1-local
173backend backend-cached-site2-local173backend backend-cached-site2-local
174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk174 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
175 http-request set-header Host site2.local175 http-request set-header Host site2.local
176 http-request set-header X-Cache-Request-IP %[src]176 http-request set-header X-Forwarded-For %[src]
177 balance roundrobin177 balance roundrobin
178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072178 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
179179
@@ -189,7 +189,7 @@ backend backend-site2-local
189backend backend-cached-site3-local189backend backend-cached-site3-local
190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk190 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
191 http-request set-header Host site3.local191 http-request set-header Host site3.local
192 http-request set-header X-Cache-Request-IP %[src]192 http-request set-header X-Forwarded-For %[src]
193 balance roundrobin193 balance roundrobin
194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096194 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
195195
@@ -207,14 +207,14 @@ backend backend-site3-local
207backend backend-cached-site4-local207backend backend-cached-site4-local
208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk208 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
209 http-request set-header Host site4.local209 http-request set-header Host site4.local
210 http-request set-header X-Cache-Request-IP %[src]210 http-request set-header X-Forwarded-For %[src]
211 balance roundrobin211 balance roundrobin
212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200212 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
213213
214backend backend-cached-site5214backend backend-cached-site5
215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk215 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
216 http-request set-header Host site5.local216 http-request set-header Host site5.local
217 http-request set-header X-Cache-Request-IP %[src]217 http-request set-header X-Forwarded-For %[src]
218 balance roundrobin218 balance roundrobin
219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200219 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
220220
@@ -235,7 +235,7 @@ backend backend-site5-2
235backend backend-cached-site6-local235backend backend-cached-site6-local
236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk236 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
237 http-request set-header Host site6.local237 http-request set-header Host site6.local
238 http-request set-header X-Cache-Request-IP %[src]238 http-request set-header X-Forwarded-For %[src]
239 balance roundrobin239 balance roundrobin
240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200240 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
241241
@@ -249,7 +249,7 @@ backend backend-site6-local
249backend backend-cached-site7-local249backend backend-cached-site7-local
250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk250 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
251 http-request set-header Host site7.local251 http-request set-header Host site7.local
252 http-request set-header X-Cache-Request-IP %[src]252 http-request set-header X-Forwarded-For %[src]
253 balance roundrobin253 balance roundrobin
254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200254 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
255255
@@ -263,7 +263,7 @@ backend backend-site7-local
263backend backend-cached-site8-local263backend backend-cached-site8-local
264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk264 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
265 http-request set-header Host site8.local265 http-request set-header Host site8.local
266 http-request set-header X-Cache-Request-IP %[src]266 http-request set-header X-Forwarded-For %[src]
267 balance roundrobin267 balance roundrobin
268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200268 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
269269
@@ -284,7 +284,7 @@ backend backend-site8-local-2
284backend backend-cached-site9-local284backend backend-cached-site9-local
285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk285 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
286 http-request set-header Host site9.local286 http-request set-header Host site9.local
287 http-request set-header X-Cache-Request-IP %[src]287 http-request set-header X-Forwarded-For %[src]
288 balance roundrobin288 balance roundrobin
289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200289 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
290290
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
index fb75f2e..5d012fb 100644
--- 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
@@ -158,7 +158,7 @@ listen site9-local
158backend backend-cached-site1-local158backend backend-cached-site1-local
159 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk159 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
160 http-request set-header Host site1.local160 http-request set-header Host site1.local
161 http-request set-header X-Cache-Request-IP %[src]161 http-request set-header X-Forwarded-For %[src]
162 balance leastconn162 balance leastconn
163 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600163 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
164164
@@ -174,7 +174,7 @@ backend backend-site1-local
174backend backend-cached-site2-local174backend backend-cached-site2-local
175 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk175 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
176 http-request set-header Host site2.local176 http-request set-header Host site2.local
177 http-request set-header X-Cache-Request-IP %[src]177 http-request set-header X-Forwarded-For %[src]
178 balance leastconn178 balance leastconn
179 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072179 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
180180
@@ -190,7 +190,7 @@ backend backend-site2-local
190backend backend-cached-site3-local190backend backend-cached-site3-local
191 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk191 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
192 http-request set-header Host site3.local192 http-request set-header Host site3.local
193 http-request set-header X-Cache-Request-IP %[src]193 http-request set-header X-Forwarded-For %[src]
194 balance leastconn194 balance leastconn
195 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096195 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
196196
@@ -208,14 +208,14 @@ backend backend-site3-local
208backend backend-cached-site4-local208backend backend-cached-site4-local
209 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk209 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
210 http-request set-header Host site4.local210 http-request set-header Host site4.local
211 http-request set-header X-Cache-Request-IP %[src]211 http-request set-header X-Forwarded-For %[src]
212 balance leastconn212 balance leastconn
213 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200213 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
214214
215backend backend-cached-site5215backend backend-cached-site5
216 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk216 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
217 http-request set-header Host site5.local217 http-request set-header Host site5.local
218 http-request set-header X-Cache-Request-IP %[src]218 http-request set-header X-Forwarded-For %[src]
219 balance leastconn219 balance leastconn
220 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200220 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
221221
@@ -236,7 +236,7 @@ backend backend-site5-2
236backend backend-cached-site6-local236backend backend-cached-site6-local
237 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk237 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
238 http-request set-header Host site6.local238 http-request set-header Host site6.local
239 http-request set-header X-Cache-Request-IP %[src]239 http-request set-header X-Forwarded-For %[src]
240 balance leastconn240 balance leastconn
241 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200241 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
242242
@@ -250,7 +250,7 @@ backend backend-site6-local
250backend backend-cached-site7-local250backend backend-cached-site7-local
251 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk251 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
252 http-request set-header Host site7.local252 http-request set-header Host site7.local
253 http-request set-header X-Cache-Request-IP %[src]253 http-request set-header X-Forwarded-For %[src]
254 balance leastconn254 balance leastconn
255 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200255 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
256256
@@ -264,7 +264,7 @@ backend backend-site7-local
264backend backend-cached-site8-local264backend backend-cached-site8-local
265 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk265 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
266 http-request set-header Host site8.local266 http-request set-header Host site8.local
267 http-request set-header X-Cache-Request-IP %[src]267 http-request set-header X-Forwarded-For %[src]
268 balance leastconn268 balance leastconn
269 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200269 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
270270
@@ -285,7 +285,7 @@ backend backend-site8-local-2
285backend backend-cached-site9-local285backend backend-cached-site9-local
286 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk286 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
287 http-request set-header Host site9.local287 http-request set-header Host site9.local
288 http-request set-header X-Cache-Request-IP %[src]288 http-request set-header X-Forwarded-For %[src]
289 balance leastconn289 balance leastconn
290 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200290 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
291291
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
index f6c4138..97611bf 100644
--- 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
@@ -157,7 +157,7 @@ listen site9-local
157backend backend-cached-site1-local157backend backend-cached-site1-local
158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk158 option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
159 http-request set-header Host site1.local159 http-request set-header Host site1.local
160 http-request set-header X-Cache-Request-IP %[src]160 http-request set-header X-Forwarded-For %[src]
161 balance leastconn161 balance leastconn
162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600162 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600
163163
@@ -174,7 +174,7 @@ backend backend-site1-local
174backend backend-cached-site2-local174backend backend-cached-site2-local
175 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk175 option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk
176 http-request set-header Host site2.local176 http-request set-header Host site2.local
177 http-request set-header X-Cache-Request-IP %[src]177 http-request set-header X-Forwarded-For %[src]
178 balance leastconn178 balance leastconn
179 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072179 server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072
180180
@@ -191,7 +191,7 @@ backend backend-site2-local
191backend backend-cached-site3-local191backend backend-cached-site3-local
192 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk192 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk
193 http-request set-header Host site3.local193 http-request set-header Host site3.local
194 http-request set-header X-Cache-Request-IP %[src]194 http-request set-header X-Forwarded-For %[src]
195 balance leastconn195 balance leastconn
196 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096196 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
197197
@@ -210,14 +210,14 @@ backend backend-site3-local
210backend backend-cached-site4-local210backend backend-cached-site4-local
211 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk211 option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk
212 http-request set-header Host site4.local212 http-request set-header Host site4.local
213 http-request set-header X-Cache-Request-IP %[src]213 http-request set-header X-Forwarded-For %[src]
214 balance leastconn214 balance leastconn
215 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200215 server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200
216216
217backend backend-cached-site5217backend backend-cached-site5
218 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk218 option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk
219 http-request set-header Host site5.local219 http-request set-header Host site5.local
220 http-request set-header X-Cache-Request-IP %[src]220 http-request set-header X-Forwarded-For %[src]
221 balance leastconn221 balance leastconn
222 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200222 server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200
223223
@@ -240,7 +240,7 @@ backend backend-site5-2
240backend backend-cached-site6-local240backend backend-cached-site6-local
241 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk241 option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk
242 http-request set-header Host site6.local242 http-request set-header Host site6.local
243 http-request set-header X-Cache-Request-IP %[src]243 http-request set-header X-Forwarded-For %[src]
244 balance leastconn244 balance leastconn
245 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200245 server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200
246246
@@ -255,7 +255,7 @@ backend backend-site6-local
255backend backend-cached-site7-local255backend backend-cached-site7-local
256 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk256 option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk
257 http-request set-header Host site7.local257 http-request set-header Host site7.local
258 http-request set-header X-Cache-Request-IP %[src]258 http-request set-header X-Forwarded-For %[src]
259 balance leastconn259 balance leastconn
260 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200260 server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200
261261
@@ -270,7 +270,7 @@ backend backend-site7-local
270backend backend-cached-site8-local270backend backend-cached-site8-local
271 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk271 option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk
272 http-request set-header Host site8.local272 http-request set-header Host site8.local
273 http-request set-header X-Cache-Request-IP %[src]273 http-request set-header X-Forwarded-For %[src]
274 balance leastconn274 balance leastconn
275 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200275 server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200
276276
@@ -293,7 +293,7 @@ backend backend-site8-local-2
293backend backend-cached-site9-local293backend backend-cached-site9-local
294 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk294 option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk
295 http-request set-header Host site9.local295 http-request set-header Host site9.local
296 http-request set-header X-Cache-Request-IP %[src]296 http-request set-header X-Forwarded-For %[src]
297 balance leastconn297 balance leastconn
298 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200298 server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200
299299
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
index 72b12df..a88388d 100644
--- 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
@@ -92,7 +92,7 @@ listen site1-local
92backend backend-cached-site1-local92backend backend-cached-site1-local
93 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk93 option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk
94 http-request set-header Host site1.local94 http-request set-header Host site1.local
95 http-request set-header X-Cache-Request-IP %[src]95 http-request set-header X-Forwarded-For %[src]
96 balance leastconn96 balance leastconn
97 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 40097 server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400
9898

Subscribers

People subscribed via source and target branches