overview landing page produces error if nova extension SimpleTenantUsage is not enabled

Bug #1211470 reported by Eric Peterson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Romain Hardouin

Bug Description

The initial landing page produces error messages when the nova extension "SimpleTenantUsage" is not enabled.

http://docs.openstack.org/developer/nova/api/nova.api.openstack.compute.contrib.simple_tenant_usage.html

To fix this, horizon should call the extension_supported() function to determine if a call should be made. A couple of options would be possible once this call is made:
1) show no data in the table, no extra messages
2) show no data in the table, possibly an info message that this information is not available
3) hide the table, just leaving the graphs from the limits call

David Lyle (david-lyle)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Low
Changed in horizon:
assignee: nobody → Romain Hardouin (romain-hardouin)
Revision history for this message
Romain Hardouin (romain-hardouin) wrote :

Hi Eric,

Would you mind explain me what are use cases which lead to disable SimpleTenantUsage?

I mean, is it for "testing" -- in such a case all fix proposals could be OK -- or have you replaced it with more advanced usage data? In which case, you do not want to see the table at all?
Thank you.

Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

Some of our deployments do not have 100% of the nova extensions installed on them, thus the error we see.

There is a relatively new api in horizon to check if certain nova extensions are installed - then horizon can more gracefully handle these situations. What I was thinking is that horizon could make that check before making the underlying api call (then the error popup would not show), and more graceful handling could occur.

Ideally the table might not even show up? That might be a little bit crazier to implement with how table views work, but would be the nicest imho.

Thanks!

Revision history for this message
Romain Hardouin (romain-hardouin) wrote :

OK, the table must not appear. I'll follow this way.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/48947

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/48947
Committed: http://github.com/openstack/horizon/commit/d43e49ae465c501ff453364a7c7cbe5f0ec8a0f0
Submitter: Jenkins
Branch: master

commit d43e49ae465c501ff453364a7c7cbe5f0ec8a0f0
Author: Romain Hardouin <email address hidden>
Date: Mon Sep 30 16:12:12 2013 +0200

    Handle the case no SimpleTenantUsage Nova extension

    When the SimpleTenantUsage Nova extension is not enabled,
    panels that include usages produce an error and
    the usage table is useless.

    Three panels use the SimpleTenantUsage extension:
    - openstack_dashboard.dashboards.admin.overview
    - openstack_dashboard.dashboards.admin.projects
    - openstack_dashboard.dashboards.project.overview

    This fix avoids errors and does not show the usage
    table in such a case.

    A context variable 'simple_tenant_usage_enabled' is now
    available in templates rendered by usage.UsageView subclasses.

    Unit tests now mock nova 'extension_supported' API.

    Change-Id: Ib306846bf6c947572ba0e7c773125d03b3dbf68b
    Closes-Bug: #1211470

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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