Bug 1275656

Summary: FontAwesome lib bad path
Product: [Community] RDO Reporter: Leslie-Alexandre DENIS <contact>
Component: openstack-horizonAssignee: Matthias Runge <mrunge>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: low Docs Contact:
Priority: unspecified    
Version: KiloCC: mrunge
Target Milestone: ---   
Target Release: Kilo   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-19 07:44:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leslie-Alexandre DENIS 2015-10-27 12:47:51 UTC
Hello,

Currently the Horizon dashboard generates a bad path into the CSS for the FontAwesome loading.

<code>
grep -nri "src: url('/dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.eot?v=4.1.0');" /usr/share/openstack-dashboard/

/usr/share/openstack-dashboard/static/dashboard/css/bff190210710.css:7948:  

src: url('/dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.eot?v=4.1.0');
</code>

Removing /dashboard into the CSS make it load correctly.
OpenStack dashboard is launched via Apache 2.4 WSGI with an Alias for the /static directory as the documentation states.
OpenStack dashboard is accessible via the / of the VirtualHost, not /dashboard.


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

openstack-dashboard-2015.1.1-1.el7

Regards,

Comment 1 Matthias Runge 2015-10-27 13:40:05 UTC
Actually, the workaround might work by coincidence; I'm not sure, where this went wrong, but it looks like an ignored WEBROOT setting somewhere in the code.

Comment 2 Leslie-Alexandre DENIS 2015-10-28 14:19:39 UTC
Hello Matthias,

I eventually found the problematic piece of code.

To begin with, the root cause is in >

/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/scss/_variables.scss

A variable named $webroot is hardcoded with "/dashboard" value at the beginning.

It's later used for FontAwesome loading in this way >

$fa-font-path: $webroot + "/static/horizon/lib/font-awesome/fonts";


I tried two fixes >

- set $webroot to "" (null) : it brakes the login of Horizon
- leave $webroot and remove the concatenation for $fa-font-path : works

Hoping that it can improve the code.

See you,
Regards

Comment 3 Leslie-Alexandre DENIS 2015-10-28 17:10:27 UTC
And just for the sake of clarity, upstream code set $webroot with "".
It's completely rewritten into Liberty though.

https://github.com/openstack/horizon/blob/stable/kilo/openstack_dashboard/static/dashboard/scss/_variables.scss

Regards,

Comment 4 Matthias Runge 2016-05-19 07:44:17 UTC
there has been quite a change and a HUGE backport to kilo. I believe this issue is fixed now.