← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charm-librarian-service-name-host into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-librarian-service-name-host into launchpad:master.

Commit message:
charm/launchpad-librarian: Set service_name to host names

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/444678

This works a little better when related to `squid-reverseproxy`, since that puts the service name in a `dstdomain` ACL.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-librarian-service-name-host into launchpad:master.
diff --git a/charm/launchpad-librarian/reactive/launchpad-librarian.py b/charm/launchpad-librarian/reactive/launchpad-librarian.py
index fd9eded..516e537 100644
--- a/charm/launchpad-librarian/reactive/launchpad-librarian.py
+++ b/charm/launchpad-librarian/reactive/launchpad-librarian.py
@@ -210,7 +210,7 @@ def configure_loadbalancer():
     unit_ip = hookenv.unit_private_ip()
     services = [
         {
-            "service_name": "librarian-download",
+            "service_name": config["librarian_download_host"],
             "service_port": config["librarian_download_port"],
             "service_host": "0.0.0.0",
             "service_options": list(service_options_download),
@@ -225,7 +225,7 @@ def configure_loadbalancer():
             ],
         },
         {
-            "service_name": "librarian-upload",
+            "service_name": config["librarian_upload_host"],
             "service_port": config["librarian_upload_port"],
             "service_host": "0.0.0.0",
             "service_options": list(service_options_upload),
@@ -241,7 +241,7 @@ def configure_loadbalancer():
             ],
         },
         {
-            "service_name": "librarian-restricted-download",
+            "service_name": config["librarian_restricted_download_host"],
             "service_port": config["librarian_restricted_download_port"],
             "service_host": "0.0.0.0",
             "service_options": list(service_options_download),
@@ -256,7 +256,7 @@ def configure_loadbalancer():
             ],
         },
         {
-            "service_name": "librarian-restricted-upload",
+            "service_name": config["librarian_restricted_upload_host"],
             "service_port": config["librarian_restricted_upload_port"],
             "service_host": "0.0.0.0",
             "service_options": list(service_options_upload),