[Openstack] [nova] Accessing instance.flavor.projects fails due to orphaned Flavor

Balazs Gibizer balazs.gibizer at ericsson.com
Thu Jan 12 13:51:21 UTC 2017


On Thu, Jan 12, 2017 at 2:31 PM, Balazs Gibizer 
<balazs.gibizer at ericsson.com> wrote:
> Hi,
> 
> The flavor field of the Instance object is a lazy-loaded field and 
> the projects field of the Flavor object is also lazy-loaded. Now it 
> seems to me that when the Instance object lazy loads instance.flavor 
> then the created Flavor object is orphaned [1] therefore 
> instance.flavor.projects will never work and result in an exceptuion: 
> OrphanedObjectError: Cannot call _load_projects on orphaned Flavor 
> object.
> 
> Is the Flavor left orphaned by intention or it is a bug?
> 
> The payload of instance.<action> notifications contains the flavor 
> related data of the instance in question and to have the 
> flavor.projects in the payload as well the code would need to access 
> the projects field via instance.flavor.projects.
> 
> Cheers,
> gibi
> 
> 
> [1] 
> https://github.com/openstack/nova/blob/master/nova/objects/instance.py#L315

Forget to add [nova] to the subject.

Cheers,
gibi


> 
> 
> _______________________________________________
> Mailing list: 
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : 
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack





More information about the Openstack mailing list