AIO horizon customization is broken with distro install

Bug #1950798 reported by Vladimir Prokofev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Dmitriy Rabotyagov

Bug Description

install_method=distro and horizon_customization_module set in variables results into a broken horizon. Playbooks execute without errors.
Underlying cause is that "python-path={{ horizon_lib_dir | dirname }}/site-packages" is declared in apache config template, which expands into "/usr/share/site-packages" for a distro install. This directory does not exist, which leads to "ModuleNotFoundError: No module named 'horizon_customization'" for apache inside horizon container.
Overrides file is correctly copied to /usr/share/openstack-dashboard/horizon_customization/__init__.py, so this can be manually fixed by issuing "ln -s /usr/share/openstack-dashboard /usr/share/site-packages" inside the horizon container and restarting apache service, but this is an ugly solution.
This was tested with stable/wallaby branch, but I believe master is affected too since it has the same config and path variables. System packages do not matter either - this is broken with both system packages(Openstack Ussuri) and with updated apt repos(Openstack Wallaby).

Steps to reproduce:
Ubuntu 20.04 LTS
sudo apt update
sudo apt dist-upgrade
sudo reboot
sudo su
git clone https://opendev.org/openstack/openstack-ansible /opt/openstack-ansible
cd /opt/openstack-ansible
git checkout stable/wallaby
scripts/bootstrap-ansible.sh
export BOOTSTRAP_OPTS="bootstrap_host_install_method=distro"
scripts/bootstrap-aio.sh
touch /opt/overrides.py
echo "horizon_customization_module: /opt/overrides.py" >> /etc/openstack_deploy/user_variables.yml
cd /opt/openstack-ansible/playbooks
openstack-ansible setup-everything.yml

Playbooks will execute without errors but trying to open dashboard will result in 503 error.

description: updated
description: updated
Changed in openstack-ansible:
status: New → Confirmed
assignee: nobody → Dmitriy Rabotyagov (noonedeadpunk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_horizon (master)
Changed in openstack-ansible:
status: Confirmed → In Progress
Changed in openstack-ansible:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_horizon (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_horizon/+/820928
Committed: https://opendev.org/openstack/openstack-ansible-os_horizon/commit/3c20e3607ec1d4ad488c532df5d87ecb8f1e20ce
Submitter: "Zuul (22348)"
Branch: master

commit 3c20e3607ec1d4ad488c532df5d87ecb8f1e20ce
Author: Dmitriy Rabotyagov <email address hidden>
Date: Tue Dec 7 20:17:18 2021 +0200

    Improve defining horizon_lib_dir

    Instead of hardcoding lib directory for distro installs, we can
    retrieve it dynamically based on the horizon.__file__ output

    Change-Id: I8e87f9a9945b7526c90ca8c4dc09e43a86ab62e0
    Closes-Bug: #1950798

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_horizon yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_horizon yoga-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.