← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charm-buildd-manager-authentication-timeout-option into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-buildd-manager-authentication-timeout-option into launchpad:master.

Commit message:
charm: Allow buildd-manager authentication timeout to be tuned

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

It looks like we may need to adjust this on production, so add a charm option for it.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-buildd-manager-authentication-timeout-option into launchpad:master.
diff --git a/charm/launchpad-buildd-manager/config.yaml b/charm/launchpad-buildd-manager/config.yaml
index ea622d3..58cbfe4 100644
--- a/charm/launchpad-buildd-manager/config.yaml
+++ b/charm/launchpad-buildd-manager/config.yaml
@@ -9,6 +9,12 @@ options:
       Credentials for reading from Artifactory repositories (formatted as
       "user:token").
     default: ""
+  authentication_timeout:
+    type: int
+    description: >
+      The time in seconds that the builddmaster will wait for a reply from
+      the authserver.
+    default: 60
   builder_proxy_auth_api_admin_secret:
     type: string
     description: >
diff --git a/charm/launchpad-buildd-manager/templates/launchpad-buildd-manager-lazr.conf b/charm/launchpad-buildd-manager/templates/launchpad-buildd-manager-lazr.conf
index ddf9fbd..3641a19 100644
--- a/charm/launchpad-buildd-manager/templates/launchpad-buildd-manager-lazr.conf
+++ b/charm/launchpad-buildd-manager/templates/launchpad-buildd-manager-lazr.conf
@@ -13,7 +13,7 @@ extends: ../launchpad-db-lazr.conf
 
 [builddmaster]
 authentication_endpoint: http://{{ domain_xmlrpc_private }}:{{ port_xmlrpc }}/authserver
-authentication_timeout: 60
+authentication_timeout: {{ authentication_timeout }}
 {{- opt("builder_proxy_auth_api_admin_username", builder_proxy_auth_api_admin_username) }}
 {{- opt("builder_proxy_auth_api_endpoint", builder_proxy_auth_api_endpoint) }}
 {{- opt("builder_proxy_host", builder_proxy_host) }}