← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1408591] [NEW] AttributeError: "'Instance' object has no attribute 'get_flavor'" when call compute_api.update

 

Public bug reported:

In nova/notifications.py(370)info_from_instance():
The AttributeError: "'Instance' object has no attribute 'get_flavor'" throws on:
instance_type = instance.get_flavor()

The stacktrace is:
-> self.compute_api.update(context, local_instance, **base_options)
  /usr/lib/python2.7/site-packages/nova/compute/api.py(235)wrapped()
-> return func(self, context, target, *args, **kwargs)
  /usr/lib/python2.7/site-packages/nova/compute/api.py(1501)update()
-> refs = self._update(context, instance, **kwargs)
  /usr/lib/python2.7/site-packages/nova/compute/api.py(1510)_update()
-> instance_ref, service="api")
  /usr/lib/python2.7/site-packages/nova/notifications.py(146)send_update()
-> old_display_name=old_display_name)
  /usr/lib/python2.7/site-packages/nova/notifications.py(226)_send_instance_update_notification()
-> payload = info_from_instance(context, instance, None, None)
> /usr/lib/python2.7/site-packages/nova/notifications.py(370)info_from_instance()
-> instance_type = instance.get_flavor()

I tried pass into the db instance and nova object instance, I believe
this should be the defect. Please look into it.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1408591

Title:
  AttributeError: "'Instance' object has no attribute 'get_flavor'" when
  call compute_api.update

Status in OpenStack Compute (Nova):
  New

Bug description:
  In nova/notifications.py(370)info_from_instance():
  The AttributeError: "'Instance' object has no attribute 'get_flavor'" throws on:
  instance_type = instance.get_flavor()

  The stacktrace is:
  -> self.compute_api.update(context, local_instance, **base_options)
    /usr/lib/python2.7/site-packages/nova/compute/api.py(235)wrapped()
  -> return func(self, context, target, *args, **kwargs)
    /usr/lib/python2.7/site-packages/nova/compute/api.py(1501)update()
  -> refs = self._update(context, instance, **kwargs)
    /usr/lib/python2.7/site-packages/nova/compute/api.py(1510)_update()
  -> instance_ref, service="api")
    /usr/lib/python2.7/site-packages/nova/notifications.py(146)send_update()
  -> old_display_name=old_display_name)
    /usr/lib/python2.7/site-packages/nova/notifications.py(226)_send_instance_update_notification()
  -> payload = info_from_instance(context, instance, None, None)
  > /usr/lib/python2.7/site-packages/nova/notifications.py(370)info_from_instance()
  -> instance_type = instance.get_flavor()

  I tried pass into the db instance and nova object instance, I believe
  this should be the defect. Please look into it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1408591/+subscriptions


Follow ups

References