Bug 1503804 - OSP11 -> OSP12 upgrade: Horizon doesn't show downstream customization
Summary: OSP11 -> OSP12 upgrade: Horizon doesn't show downstream customization
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: 12.0 (Pike)
Assignee: Beth White
QA Contact: Ola Pavlenko
URL:
Whiteboard:
Depends On:
Blocks: 1516324
TreeView+ depends on / blocked
 
Reported: 2017-10-18 19:27 UTC by Marius Cornea
Modified: 2018-02-05 19:15 UTC (History)
11 users (show)

Fixed In Version: openstack-tripleo-heat-templates-7.0.3-7.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 22:17:19 UTC
Target Upstream Version:


Attachments (Terms of Use)
horizon dashboard (64.97 KB, image/png)
2017-10-18 19:27 UTC, Marius Cornea
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 518384 0 None None None 2017-11-07 19:24:47 UTC
OpenStack gerrit 518533 0 None None None 2017-11-15 17:34:55 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description Marius Cornea 2017-10-18 19:27:47 UTC
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

Comment 1 Radomir Dopieralski 2017-10-26 17:26:43 UTC
The theme package is not installed inside the docker image.

Comment 3 Radomir Dopieralski 2017-11-06 13:54:41 UTC
It seems that in the latest puddle the theme is installed, but since "manage.py compress" hasn't been run, Horizon throws OfflineGenerationError.

Comment 4 Radomir Dopieralski 2017-11-07 17:11:34 UTC
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.

Comment 5 Radomir Dopieralski 2017-11-07 17:20:48 UTC
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.

Comment 6 Radomir Dopieralski 2017-11-07 19:13:09 UTC
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.

Comment 7 Radomir Dopieralski 2017-11-07 19:24:47 UTC
Made a patch fixing the issue: https://review.openstack.org/518384

Comment 8 Radomir Dopieralski 2017-11-08 21:08:00 UTC
The patch merged upstream, backported it to pike.

Comment 15 errata-xmlrpc 2017-12-13 22:17:19 UTC
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


Note You need to log in before you can comment on or make changes to this bug.