From f9c814a1a59dbfe47e15fbc64aecf81d8a19a5f0 Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Thu, 4 Jun 2020 15:18:48 +0200 Subject: [PATCH] Fix STATIC_ROOT for Debian, Ubuntu STATIC_ROOT in local_settings.py should be configured to path which is also configured in apache's config. For debian, ubuntu binary setup it is /var/lib/openstack-dashboard/static. Reason why it is "accidentaly" working is: For debian package: Package is overriding STATIC_ROOT in /etc/openstack-dashboard/local_settings.d/_0003_debian_static_root.py. But this is going to be removed from settings in https://review.opendev.org/733607. For ubuntu package: Ubuntu package is adding patch to package which is including PYTHON_PATH do /usr/share/openstack-dashboard/ And also they are creating several dirty symlinks to get it working. This patch is fixing this behaviour more clearly. Change-Id: I9862ac7ab462ca9018b684d63f26458ddda9f73a --- ansible/roles/horizon/templates/local_settings.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2 index 16b2bf7d32..3b7f86aa27 100644 --- a/ansible/roles/horizon/templates/local_settings.j2 +++ b/ansible/roles/horizon/templates/local_settings.j2 @@ -845,6 +845,9 @@ KEY_MANAGER = { 'project_domain_name': '{{ default_project_domain_name }}' } {% endif %} +{% if kolla_base_distro in ['debian', 'ubuntu'] and horizon_install_type == 'binary' %} +STATIC_ROOT = "/var/lib/openstack-dashboard/static/" +{% endif %} # Allow operators to overwrite variables (LP: #1769970). from .custom_local_settings import *