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>
This commit is contained in:
Goutham Pacha Ravi 2021-05-26 10:33:02 -07:00
parent 86ba5af3a7
commit 6c8fbd330b

View File

@ -5,7 +5,8 @@ set -o errexit
FORCE_GENERATE="${FORCE_GENERATE}" FORCE_GENERATE="${FORCE_GENERATE}"
HASH_PATH=/var/lib/kolla/.settings.md5sum.txt HASH_PATH=/var/lib/kolla/.settings.md5sum.txt
MANAGE_PY="/usr/bin/python3 /usr/bin/manage.py" 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 if [[ -f /etc/openstack-dashboard/custom_local_settings ]]; then
CUSTOM_SETTINGS_FILE="${SITE_PACKAGES}/openstack_dashboard/local/custom_local_settings.py" CUSTOM_SETTINGS_FILE="${SITE_PACKAGES}/openstack_dashboard/local/custom_local_settings.py"