broken instance linkage under project overview page

Bug #1003299 reported by Edward
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Lin Hua Cheng

Bug Description

Under project overview page, the instances are listed as summary. But the linkage of instance is broken. The instance id included in the URL is not an uuid. But the same instance link is correct under project "Instance & Volumes" page.

Here's an example of broken URL:
http://192.168.156.180/nova/instances_and_volumes/instances/140534011350288/detail

The correct link is:
http://192.168.156.180/nova/instances_and_volumes/instances/54aa4c71-d2c6-44c5-a46f-fba0d969a6b7/detail

Revision history for this message
Edward (zhang-hare) wrote :
Revision history for this message
Vincent Hou (houshengbo) wrote :

Under Tab instances & volumes, we can click the instance name and go to the detail page of this instance, if there are instances available.
When switching to the Tab Overview, clicking the instance name will lead to this error.

Changed in horizon:
status: New → Confirmed
Revision history for this message
Edward (zhang-hare) wrote :

from code analysis, the id included in the URL is not an actual instance id, but a build-in object id. The summary usage information in overview page for each tenant seems incomplete in current implementation. It is using tenant usage data instead of all listed instances usage information.

View:

horizon/horizon/dashboard/nova/overview/view.py
...
class ProjectOverview(usage.UsageView):
    table_class = usage.TenantUsageTable
    usage_class = usage.TenantUsage
    template_name = 'nova/overview/usage.html'

    def get_data(self):
        super(ProjectOverview, self).get_data()
        return self.usage.get_instances()

Model:

horizon/horizon/usage/tables.py
...
class TenantUsageTable(BaseUsageTable):
    instance = tables.Column('name',
                             verbose_name=_("Instance Name"),
                             link=("horizon:nova:instances_and_volumes:"
                                   "instances:detail"))
    uptime = tables.Column('uptime_at',
                           verbose_name=_("Uptime"),
                           filters=(timesince,))

    def get_object_id(self, datum):
       ''' This is actual an build-in object id, not the instance id. '''
        return id(datum)

    class Meta:
        name = "tenant_usage"
        verbose_name = _("Usage Summary")
        columns = ("instance", "vcpus", "disk", "memory", "uptime")
        table_actions = (CSVSummary,)
        multi_select = False

Vincent Hou (houshengbo)
Changed in horizon:
status: Confirmed → New
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Yep. That's just broken. Good catch.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
importance: Undecided → High
milestone: none → folsom-2
status: New → Confirmed
Changed in horizon:
assignee: Gabriel Hurley (gabriel-hurley) → John Postlethwait (john-postlethwait)
status: Confirmed → In Progress
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/8259

Changed in horizon:
assignee: John Postlethwait (john-postlethwait) → nobody
status: In Progress → Confirmed
Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Gabriel,

when the user clicks on the instance link, is it supposed to open the link /syspanel/projects/<tenant_id>/usage ?

Or does it need an entirely new page to open?

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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/8837
Committed: http://github.com/openstack/horizon/commit/a6703494206ba72c1df46950c4425076e154d730
Submitter: Jenkins
Branch: master

commit a6703494206ba72c1df46950c4425076e154d730
Author: Lin Hua Cheng <email address hidden>
Date: Thu Jun 21 21:55:57 2012 -0700

    Fix Project Overview link to use instance_id

    Fixes Bug #1003299

    Tenant Usage API has been updated to include
    instance_id in the response (bug 1003093). The
    link has been updated to used instance_id.

    Change-Id: I9d5fcf120b1e5966a5e019e5b17dea7806f20650

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: folsom-2 → 2012.2
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.