update_metadata for flavors and images shows blank. static basePath not set correctly.

Bug #1476439 reported by Ross Krumbeck
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Timur Sufiev

Bug Description

Currently using OpenStack Kilo on CentOS 7. Issue is with:

openstack-dashboard-2015.1.0-7.el7.noarch
/usr/share/openstack-dashboard/static/angular/widget.module.js

When using the update_metadata feature in horizon in the flavors and images section, the meta data table is not displayed. Have also seen this cause problems when using heat.

The basePath in the javascript is not being set correctly and resulting in a redirect loop:

[Tue Jul 21 00:14:22.097739 2015] [core:error] [pid 14453] (36)File name too long: [client ] AH00036: access to /dashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboardauth/login/ failed (filesystem path '/var/www/html/dashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboarddashboardauth')

I was able to fix by modifying the widget.module.js file

$ diff -u /usr/share/openstack-dashboard/static/angular/widget.module.js.orig /usr/share/openstack-dashboard/static/angular/widget.module.js
--- /usr/share/openstack-dashboard/static/angular/widget.module.js.orig 2015-07-21 00:55:07.641502063 +0000
+++ /usr/share/openstack-dashboard/static/angular/widget.module.js 2015-07-21 00:41:37.476953146 +0000
@@ -17,6 +17,6 @@
     'hz.widget.metadata-display',
     'hz.framework.validators'
   ])
- .constant('basePath', '/static/angular/');
+ .constant('basePath', '/dashboard/static/angular/');

 })();

Ideally this file should not need to be modified and should be generated using WEBROOT in local_settings, alternatively documentation should be updated if this file must be modified by hand.

Revision history for this message
Ross Krumbeck (rkrum) wrote :

An alternate work around is to add an additional Apache alias in the vhost configuration:

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

Matthias Runge (mrunge)
Changed in horizon:
status: New → Confirmed
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
Changed in horizon:
assignee: nobody → Timur Sufiev (tsufiev-x)
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

The backport is ready and waiting to be merged.

Changed in horizon:
status: Confirmed → In Progress
Timur Sufiev (tsufiev-x)
Changed in horizon:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/kilo)

Reviewed: https://review.openstack.org/209108
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a903c420e53ece9bf358ee149f449322709741e0
Submitter: Jenkins
Branch: stable/kilo

commit a903c420e53ece9bf358ee149f449322709741e0
Author: Timur Sufiev <email address hidden>
Date: Mon Aug 31 18:46:05 2015 +0300

    Backport the WEBROOT fixes for JS and CSS into Kilo

    This commit includes changes relevant to commits
    https://review.openstack.org/181095 and
    https://review.openstack.org/#/c/201769/. But rather than precisely
    backporting the above commits (which is impossible due to different
    code structure), a 'symptomatic treatment' approach is used: we fix
    every problem which is related to being ignorant to WEBROOT setting in
    Kilo. Among the places being fixed are:

    * edit metadata widget
    * launch instance NG (both templates and service calls).

    Closes-Bug: #1476439
    Related-Bug: #1451681
    Change-Id: I2f5a6189393977c4a4cfccb5f3c771afab21d92c

tags: added: in-stable-kilo
Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → mitaka-2
Changed in horizon:
status: Fix Committed → Fix Released
no longer affects: horizon/kilo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.