Skip to content

Commit 6eb1bfa

Browse files
committed
Trivial fix horizon's healthcheck when SSL turned on
This patch is fixing docker healthcheck for horizon by changing value of horizon_listen_port, so both apache's virtualhost and healthcheck will have same correct port always. Also removing useless apache's redirect as all redirects are done on haproxy side. Closes-Bug: #1933846 Change-Id: Ibb5ad1a5d1bbc74bcb62610d77852d8124c4a323
1 parent 10d4a09 commit 6eb1bfa

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ansible/group_vars/all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ heat_api_cfn_listen_port: "{{ heat_api_cfn_port }}"
326326

327327
horizon_port: "80"
328328
horizon_tls_port: "443"
329-
horizon_listen_port: "{{ horizon_port }}"
329+
horizon_listen_port: "{{ horizon_tls_port if horizon_enable_tls_backend | bool else horizon_port }}"
330330

331331
influxdb_http_port: "8086"
332332

ansible/roles/horizon/templates/horizon.conf.j2

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ServerSignature Off
1313
ServerTokens Prod
1414
TraceEnable off
1515

16-
<VirtualHost *:{{ horizon_listen_port }}>
16+
<VirtualHost {{ api_interface_address }}:{{ horizon_listen_port }}>
1717
LogLevel warn
1818
ErrorLog /var/log/kolla/horizon/horizon.log
1919
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
@@ -50,11 +50,6 @@ TraceEnable off
5050
{% endif %}
5151
</VirtualHost>
5252

53-
{# FIXME(yoctozepto): enabling of either tls will break the other if not enabled too #}
54-
{% if kolla_enable_tls_external | bool or kolla_enable_tls_internal | bool %}
55-
Header edit Location ^http://(.*)$ https://$1
56-
{% endif %}
57-
5853
<IfModule mod_deflate.c>
5954
# Compress HTML, CSS, JavaScript, Json, Text, XML and fonts
6055
AddOutputFilterByType DEFLATE application/javascript
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes horizon's healthcheck when SSL is turned on.
5+
`LP#1933846 <https://launchpad.net/bugs/1933846>`__

0 commit comments

Comments
 (0)