Bug 1316534 - some webfonts not found when using material theme
Summary: some webfonts not found when using material theme
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-horizon
Version: trunk
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: trunk
Assignee: Matthias Runge
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 12:27 UTC by Sandro Mathys
Modified: 2016-05-19 07:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-19 07:45:21 UTC


Attachments (Terms of Use)

Description Sandro Mathys 2016-03-10 12:27:24 UTC
The issue below showed up in a Mitaka installation, that was set up using Packstack. The issue could probably be fixed in Packstack/puppet-openstack, but I think fixing it in the the openstack-horizon package is both simpler and cleaner, thus reporting it against openstack-dashboard.

Description of problem:
If the theme is switched to "Material", several webfonts fail to load. From Google Chrome's console:

http://209.132.184.147/dashboard/static//horizon/lib/mdi/fonts/materialdesignicons-webfont.woff2?v=1.1.70 Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Regular.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Bold.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/mdi/fonts/materialdesignicons-webfont.woff?v=1.1.70 Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Bold.woff Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Regular.woff Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Bold.ttf Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/mdi/fonts/materialdesignicons-webfont.ttf?v=1.1.70 Failed to load resource: the server responded with a status of 404 (Not Found)
http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Regular.ttf Failed to load resource: the server responded with a status of 404 (Not Found)

The horizon_access.log is showing:
14.3.86.126 - - [10/Mar/2016:11:37:20 +0000] "GET /dashboard/static//horizon/lib/mdi/fonts/materialdesignicons-webfont.woff2?v=1.1.70 HTTP/1.1" 404 271 "http://209.132.184.147/dashboard/static/dashboard/css/7ec3d5399fed.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:20 +0000] "GET /dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Regular.woff2 HTTP/1.1" 404 270 "http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/css/roboto-fontface.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:20 +0000] "GET /dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Bold.woff2 HTTP/1.1" 404 267 "http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/css/roboto-fontface.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:21 +0000] "GET /dashboard/static//horizon/lib/mdi/fonts/materialdesignicons-webfont.woff?v=1.1.70 HTTP/1.1" 404 270 "http://209.132.184.147/dashboard/static/dashboard/css/7ec3d5399fed.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:21 +0000] "GET /dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Regular.woff HTTP/1.1" 404 269 "http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/css/roboto-fontface.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:21 +0000] "GET /dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Bold.woff HTTP/1.1" 404 266 "http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/css/roboto-fontface.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:21 +0000] "GET /dashboard/static//horizon/lib/mdi/fonts/materialdesignicons-webfont.ttf?v=1.1.70 HTTP/1.1" 404 269 "http://209.132.184.147/dashboard/static/dashboard/css/7ec3d5399fed.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:21 +0000] "GET /dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Regular.ttf HTTP/1.1" 404 268 "http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/css/roboto-fontface.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"
14.3.86.126 - - [10/Mar/2016:11:37:21 +0000] "GET /dashboard/static//horizon/lib/roboto_fontface/fonts/Roboto-Bold.ttf HTTP/1.1" 404 265 "http://209.132.184.147/dashboard/static//horizon/lib/roboto_fontface/css/roboto-fontface.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36"

There's a relevant Alias in /etc/httpd/conf.d/15-horizon_vhost.conf:
Alias /dashboard/static "/usr/share/openstack-dashboard/static"

So the webserver is looking for the fonts in subdirectories of /usr/share/openstack-dashboard/static/ but they don't exist:
[root@red-test ~]# find /usr/share/openstack-dashboard/static/horizon/lib/ -type f -name '*.ttf' -o -name '*.woff*'
/usr/share/openstack-dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.ttf
/usr/share/openstack-dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.woff
/usr/share/openstack-dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.woff2

Instead, the fonts were (correctly) installed into /usr/share/fonts, e.g.:
[root@red-test ~]# locate Roboto-Bold.ttf
/usr/share/fonts/roboto_fontface/Roboto-Bold.ttf
[root@red-test ~]# locate materialdesignicons-webfont.woff2
/usr/share/fonts/mdi/materialdesignicons-webfont.woff2

I see two feasible solutions:
1) add symlinks to the relevant horizon package
2) add aliases for the directories to the httpd config

The first one is probably much easier and cleaner. The following command did resolve the issue for the materialdesignicons-webfont.woff2 without any further steps:
[root@red-test mdi]# ln -s /usr/share/fonts/mdi/ /usr/share/openstack-dashboard/static/horizon/lib/mdi/fonts

Version-Release number of selected component (if applicable):
[root@red-test mdi]# rpm -qa | grep -e horizon -e packstack -e openstack-puppet -e dashboard
openstack-puppet-modules-8.0.0a0-0.20160304203011.7dc7e93.el7.centos.noarch
openstack-dashboard-9.0.0.0b4-0.20160304094124.ecaf1a4.el7.centos.noarch
openstack-packstack-puppet-8.0.0-0.20160303124552.0476b9b.el7.centos.noarch
python-django-horizon-9.0.0.0b4-0.20160304094124.ecaf1a4.el7.centos.noarch
openstack-packstack-8.0.0-0.20160303124552.0476b9b.el7.centos.noarch

Comment 1 Matthias Runge 2016-05-19 07:45:21 UTC
Thank you for the report, the issue has been fixed in python-XStatic-mdi and python-XStatic-Roboto_fonts


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