"Nova show" lists incorrect property for compute host

Bug #1044238 reported by Rohit Karajgi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Jian Wen

Bug Description

I have a devstack environment with 2 compute nodes.
Spawned and instance, it was successfully launched on compute node 2 (confirmed with virsh on compute node 2).
However, the Hypervisor listing for this instance in the "nova show" command shows compute node 1.
The "Host" and "Hypervisor" entries should always be the same for any instance.

Command output : http://paste.openstack.org/show/20594/

Jian Wen (wenjianhn)
Changed in nova:
assignee: nobody → Sina Web Service Dev (sws)
Changed in nova:
assignee: Sina Web Service Dev (sws) → Jian Wen (wenjianhn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/12292
Committed: http://github.com/openstack/nova/commit/b9f1138be0c982edcfcfb289f64c356e00dd95d0
Submitter: Jenkins
Branch: master

commit b9f1138be0c982edcfcfb289f64c356e00dd95d0
Author: Jian Wen <email address hidden>
Date: Mon Sep 3 16:14:44 2012 +0800

    Fixes sqlalchemy.api.compute_node_get_by_host

    Use join('service') instead of options(joinedload('service')) to get
    the right compute_node

    Fixes bug 1044238

    Change-Id: I082a46847e63a1e21083a625c3b07ec9be05412f

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Jian Wen (wenjianhn) wrote :

NOTE

Mark McLoughlin has posted comments on this change.

Change subject: Fixes sqlalchemy.api.compute_node_get_by_host
......................................................................

Patch Set 2: Looks good to me (core reviewer); Approved

The note here:

  http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#joined-load

appears to make it fairly clear:

  The join created by joinedload() is anonymously aliased such that it does not affect the query results. An Query.order_by() or Query.filter() call cannot reference these aliased tables

I would have liked to have seen a test case for this and a little more explanation in the commit message, but thanks for the fix!

Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc1 → 2012.2
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.