Merge ~lgp171188/launchpad:codehosting-charm-https-vhost-config-fixes into launchpad:master

Proposed by Guruprasad
Status: Merged
Approved by: Guruprasad
Approved revision: 87cbaec5b6b700de765253bae10c7c1d2e3a71e0
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~lgp171188/launchpad:codehosting-charm-https-vhost-config-fixes
Merge into: launchpad:master
Diff against target: 33 lines (+3/-3)
2 files modified
charm/launchpad-codehosting/config.yaml (+2/-2)
charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2 (+1/-1)
Reviewer Review Type Date Requested Status
Simone Pelosi Approve
Ines Almeida Approve
Review via email: mp+458127@code.launchpad.net

Commit message

charm/launchpad-codehosting: Fix a bug in the bzr https vhost config

When renaming all the previous occurrences of
'codebrowse_internal_endpoint' to 'internal_codebrowse_root', this was
missed and it is causing the rewrite rule to be wrong.

To post a comment you must log in.
Revision history for this message
Simone Pelosi (pelpsi) wrote :

Is this still required?

review: Needs Information
Revision history for this message
Guruprasad (lgp171188) wrote :

Hi Simone, yes. This is needed. Applying this without a few related, additional fixes makes the haproxy healthchecks (and hence codebrowse) go down. I will request review once I have those fixes ready too.

Revision history for this message
Ines Almeida (ines-almeida) wrote :

LGTM!
Have you checked the `haproxy_service_options_http` config in qastaging?

review: Approve
Revision history for this message
Simone Pelosi (pelpsi) :
review: Approve
Revision history for this message
Guruprasad (lgp171188) wrote :

> Have you checked the `haproxy_service_options_http` config in qastaging?

Yes. I have and it works.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm/launchpad-codehosting/config.yaml b/charm/launchpad-codehosting/config.yaml
2index c41fd80..67d432c 100644
3--- a/charm/launchpad-codehosting/config.yaml
4+++ b/charm/launchpad-codehosting/config.yaml
5@@ -56,7 +56,7 @@ options:
6 default: |
7 - mode http
8 - option httplog
9- - option httpchk HEAD / HTTP/1.0
10+ - option httpchk HEAD /favicon.ico HTTP/1.0
11 - option forwardfor
12 - balance leastconn
13 haproxy_service_options_https:
14@@ -66,7 +66,7 @@ options:
15 default: |
16 - mode http
17 - option httplog
18- - option httpchk HEAD / HTTP/1.0
19+ - option httpchk HEAD /favicon.ico HTTP/1.0
20 - option forwardfor
21 - balance leastconn
22 haproxy_service_options_ssh:
23diff --git a/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2 b/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2
24index e531b50..2740a53 100644
25--- a/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2
26+++ b/charm/launchpad-codehosting/templates/vhosts/bazaar_https.conf.j2
27@@ -33,6 +33,6 @@
28 RewriteRule ^/robots.txt$ - [L]
29 RewriteRule ^/favicon.ico$ {{ loggerhead_static_dir }}/images/favicon.ico [L]
30 RewriteRule ^/static/(.*)$ /$1 [L]
31- RewriteRule ^/(.*)$ {{ codebrowse_internal_endpoint }}/$1 [P,L]
32+ RewriteRule ^/(.*)$ {{ internal_codebrowse_root }}/$1 [P,L]
33 </VirtualHost>
34

Subscribers

People subscribed via source and target branches

to status/vote changes: