Hide Forgot
Created attachment 1340366 [details] horizon dashboard Description of problem: OSP11 -> OSP12 upgrade: After upgrade has finished Horizon doesn't show downstream customizations. Version-Release number of selected component (if applicable): [root@controller-0 stack]# docker ps | grep horizon 7173e9266e88 192.168.0.1:8787/rhosp12/openstack-horizon-docker:20171017.1 "kolla_start" 3 hours ago Up 3 hours horizon How reproducible: 100% Steps to Reproduce: 1. Deploy an OSP11 split stack environment with 3 controller, 3 messaging, 3 db, 2 networker, 2 compute, 3 ceph nodes 2. Upgrade to OSP12 3. Open in the browser the Horizon public URL Actual results: Attaching screenshot. Expected results: Downstream theme is loaded. Additional info: [root@controller-0 stack]# docker exec -it horizon rpm -qa | grep horizon python-django-horizon-12.0.1-0.20171009150957.79a5295.el7ost.noarch [root@controller-0 stack]# docker exec -it horizon rpm -qa | grep dashboard openstack-dashboard-theme-12.0.0-3.el7ost.noarch openstack-dashboard-12.0.1-0.20171009150957.79a5295.el7ost.noarch
The theme package is not installed inside the docker image.
It seems that in the latest puddle the theme is installed, but since "manage.py compress" hasn't been run, Horizon throws OfflineGenerationError.
Fact I know so far: 1. running "manage.py compress" doesn't solve the issue 2. disabling offline compression does make Horizon work, and shows the downstream theme correctly, 3. running horizon as root doesn't sidestep the error, so it's not a file permission problem It seems like for some reason the content hashes for the css files are different when run by manage.py compress than when run by manage.py runserver, but I have no idea why that may be.
Running horizon once with offline compression disabled fixed the problem somehow and now it also works with the offline compression enabled. I'm trying to figure out what changed.
I found it. The directory /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.d/ is not accessible to the apache user that runs Horizon. Since it contains the file that sets our downstream theme, and since compress is ran as root, the offline compression happens including our theme, but the running horizon doesn't see that file and expects css files without our theme, and fails to find them. Adding the a+rX rights to that directory solves the problem.
Made a patch fixing the issue: https://review.openstack.org/518384
The patch merged upstream, backported it to pike.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:3462