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

Proposed by Haw Loeung
Status: Merged
Approved by: Barry Price
Approved revision: 683c6fab5158cd264c657db993cccd2fe42e0ba5
Merged at revision: 68515ed2ee86f8b5f1e1b4bb5a8f0397b5249d9f
Proposed branch: ~hloeung/content-cache-charm:master
Merge into: content-cache-charm:master
Diff against target: 66 lines (+11/-0)
5 files modified
reactive/content_cache.py (+3/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+2/-0)
tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+2/-0)
Reviewer Review Type Date Requested Status
Barry Price Approve
Canonical IS Reviewers Pending
Review via email: mp+392271@code.launchpad.net

Commit message

Fixed passing through HAProxy backend options

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

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

Revision history for this message
Barry Price (barryprice) wrote :

+1

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 68515ed2ee86f8b5f1e1b4bb5a8f0397b5249d9f

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/reactive/content_cache.py b/reactive/content_cache.py
index c3487d6..42c0997 100644
--- a/reactive/content_cache.py
+++ b/reactive/content_cache.py
@@ -298,6 +298,9 @@ def configure_haproxy(): # NOQA: C901 LP#1825084
298 if backend_check_path:298 if backend_check_path:
299 new_cached_loc_conf['backend-check-path'] = backend_check_path299 new_cached_loc_conf['backend-check-path'] = backend_check_path
300 new_loc_conf['backend-check-path'] = backend_check_path300 new_loc_conf['backend-check-path'] = backend_check_path
301 backend_options = loc_conf.get('backend-options')
302 if backend_options:
303 new_loc_conf['backend-options'] = backend_options
301 new_cached_loc_conf['signed-url-hmac-key'] = loc_conf.get('signed-url-hmac-key')304 new_cached_loc_conf['signed-url-hmac-key'] = loc_conf.get('signed-url-hmac-key')
302 # Pass through selected backend location configs, if defined.305 # Pass through selected backend location configs, if defined.
303 for key in ('site-name', 'backend-inter-time', 'backend-tls'):306 for key in ('site-name', 'backend-inter-time', 'backend-tls'):
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 b09d77e..bd1bd1e 100644
--- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
+++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt
@@ -177,6 +177,8 @@ backend backend-cached-site3-local
177 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096177 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
178178
179backend backend-site3-local179backend backend-site3-local
180 option forwardfor except 127.0.0.1
181 option forceclose
180 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache182 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache
181 http-request set-header Host site3.local183 http-request set-header Host site3.local
182 balance leastconn184 balance leastconn
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 0b8a9f4..d7c2c0a 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
@@ -177,6 +177,8 @@ backend backend-cached-site3-local
177 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096177 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
178178
179backend backend-site3-local179backend backend-site3-local
180 option forwardfor except 127.0.0.1
181 option forceclose
180 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache182 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache
181 http-request set-header Host site3.local183 http-request set-header Host site3.local
182 balance leastconn184 balance leastconn
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 b2958cb..486f3a2 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
@@ -177,6 +177,8 @@ backend backend-cached-site3-local
177 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096177 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
178178
179backend backend-site3-local179backend backend-site3-local
180 option forwardfor except 127.0.0.1
181 option forceclose
180 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache182 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache
181 http-request set-header Host site3.local183 http-request set-header Host site3.local
182 balance roundrobin184 balance roundrobin
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 52e9cdd..4e64b08 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
@@ -178,6 +178,8 @@ backend backend-cached-site3-local
178 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096178 server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096
179179
180backend backend-site3-local180backend backend-site3-local
181 option forwardfor except 127.0.0.1
182 option forceclose
181 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache183 option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk\r\nCache-Control:\ no-cache
182 http-request set-header Host site3.local184 http-request set-header Host site3.local
183 balance leastconn185 balance leastconn

Subscribers

People subscribed via source and target branches