Bug 1211552

Summary: Need to add alias in openstack-dashboard.conf to show CSS content
Product: [Community] RDO Reporter: Javier Peña <jpena>
Component: python-django-horizonAssignee: Matthias Runge <mrunge>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: trunkCC: aortega, apevec, athomas, mrunge, yeylon
Target Milestone: ---   
Target Release: Kilo   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-30 23:08:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Javier Peña 2015-04-14 10:07:26 UTC
Description of problem:
When installing openstack-dashboard-2015.1-dev306.fc21.noarch from the Delorean repo on a Fedora 21 system and starting httpd, the following errors are displayed on /var/log/httpd/error_log, and the web page shows without any CSS content:

[Tue Apr 14 08:42:35.212048 2015] [wsgi:error] [pid 16993] Not Found: /dashboard/static/dashboard/js/76adef98ad14.js
[Tue Apr 14 08:42:35.215316 2015] [wsgi:error] [pid 16993] Not Found: /dashboard/static/dashboard/img/favicon.ico
[Tue Apr 14 08:42:35.267375 2015] [wsgi:error] [pid 16993] Not Found: /dashboard/static/dashboard/js/87acf9c3aa9c.js
[Tue Apr 14 08:42:35.298567 2015] [wsgi:error] [pid 16993] Not Found: /dashboard/static/dashboard/js/4c734d3a4ff4.js
[Tue Apr 14 08:42:35.321533 2015] [wsgi:error] [pid 16993] Not Found: /dashboard/static/dashboard/img/favicon.ico

Adding the following line to /etc/httpd/conf.d/openstack-dashboard.conf fixed it:

Alias /dashboard/static /usr/share/openstack-dashboard/static

Version-Release number of selected component (if applicable):

How reproducible: always

Steps to Reproduce:
1. Install the above mentioned version from the delorean repo
2. Start httpd
3. Navigate to OpenStack Dashboard page

Actual results:
Page is shown without CSS

Expected results:
CSS information is included

Additional info:

Comment 1 Javier Peña 2015-04-14 10:41:31 UTC
After some more testing, I have found the reason. The reason seems to be the introduction of the WEBROOT option in the Kilo cycle (with a default value of "/dashboard/"). So we do not need to add the alias, but actually replace the current alias in /etc/httpd/conf.d/openstack-dashboard.conf from:

Alias /static /usr/share/openstack-dashboard/static


Alias /dashboard/static /usr/share/openstack-dashboard/static

Comment 2 Matthias Runge 2015-04-14 11:17:20 UTC
That feature is not entirely new, it was just upstreaming a downstream patch.