is_loaded not set when novaclient resource instantiated by manager

Bug #971183 reported by Gabriel Hurley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Low
Brian Waldon

Bug Description

When instantiating an object using the manager class' get method, the loaded=True kwarg is not being passed in, thus the resource thinks it's not loaded, causing weird double-fetching issues when accessing attributes which may or may not exist.

The changeset that introduced this bug is here:

https://github.com/openstack/python-novaclient/commit/4e456d6bbc37f4694aafb8e35a435656b52c5a25

Thierry Carrez (ttx)
tags: added: python-novaclient
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Should be as simple as setting loaded=True wherever a Manager instantiates a Resource.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

We also don't need to be looking up uuid in base.getid anymore (which is causing your duplicate requests)

Thierry Carrez (ttx)
Changed in nova:
importance: Medium → Low
tags: removed: essex-rc-potential
Brian Waldon (bcwaldon)
Changed in nova:
assignee: nobody → Brian Waldon (bcwaldon)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/6208
Committed: http://github.com/openstack/python-novaclient/commit/ea448e24971c58e9edc7d837c6dfef3941a6c878
Submitter: Jenkins
Branch: master

commit ea448e24971c58e9edc7d837c6dfef3941a6c878
Author: Brian Waldon <email address hidden>
Date: Tue Apr 3 19:16:05 2012 -0700

    Set resources as loaded on get

    * Setting a resource to loaded prevents future lazy-loading
    * Remove lookup by uuid in getid helper as it is no longer used
    * Fixes bug 971183

    Change-Id: Idd9d39ded41b94b08b03476c30e50277b477423d

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
affects: nova → python-novaclient
Changed in python-novaclient:
milestone: folsom-1 → none
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.