Browse Source

Fix site-packages in horizon's extend_start.sh

We were relying on an unset variable from kolla:
KOLLA_DISTRO_PYTHON_VERSION to figure out the
location of site-packages to bootstrap horizon
and load its various plugins. Since we only support
python3, we can drop the need for a config variable,
and rely on facts from the system to find our way.

Change-Id: I428723525a334f7bf2235d8e6ae62da6d5d00bb7
Closes-Bug: BZ#1928291
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
(cherry picked from commit 6c8fbd330b)
(cherry picked from commit b81b1ea146)
(cherry picked from commit 14b7d3e78a)
(cherry picked from commit 9e22f65ea2)
changes/85/793185/2
Goutham Pacha Ravi 2 months ago
parent
commit
a9863faf4a
  1. 3
      container-images/kolla/horizon/extend_start.sh

3
container-images/kolla/horizon/extend_start.sh

@ -5,7 +5,8 @@ set -o errexit
FORCE_GENERATE="${FORCE_GENERATE}"
HASH_PATH=/var/lib/kolla/.settings.md5sum.txt
MANAGE_PY="/usr/bin/python3 /usr/bin/manage.py"
SITE_PACKAGES="/usr/lib/python${KOLLA_DISTRO_PYTHON_VERSION:-3}/site-packages"
PYTHON_VERSION=$(python3 --version | awk '{print $2}' | awk -F'.' '{print $1"."$2}')
SITE_PACKAGES="/usr/lib/python${PYTHON_VERSION}/site-packages"
if [[ -f /etc/openstack-dashboard/custom_local_settings ]]; then
CUSTOM_SETTINGS_FILE="${SITE_PACKAGES}/openstack_dashboard/local/custom_local_settings.py"

Loading…
Cancel
Save