nova compute manager traceback during _sync_power_states

Bug #938763 reported by Andrew Glen-Young
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Medium
Unassigned
nova (Ubuntu)
New
Medium
Unassigned

Bug Description

After upgrading nova-compute this morning to the latest nova-compute package in Precise I have noticed a non-fatal traceback in /var/log/nova/nova-compute.log.

Traceback:

2012-02-22 15:04:28,413 ERROR nova.manager [-] Error during ComputeManager._sync_power_states: 'dict' object has no attribute 'state'
(nova.manager): TRACE: Traceback (most recent call last):
(nova.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/manager.py", line 155, in periodic_tasks
(nova.manager): TRACE: task(self, context)
(nova.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2143, in _sync_power_states
(nova.manager): TRACE: vm_power_state = vm_instance.state
(nova.manager): TRACE: AttributeError: 'dict' object has no attribute 'state'
(nova.manager): TRACE:

This does not seem to affect the nova-compute daemon (so far).

$ dpkg-query --show nova-compute
nova-compute 2012.1~e4~20120217.12709-0ubuntu1

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu precise (development branch)"

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Hi Andrew, thanks for the report. To be clear, was this an upgrade from the Oneiric/Diablo to Preicse/Essex, or an upgrade between version of Essex? Also, is it correct to assume that, at the time of the upgrade, there were instances running on the compute node? Thanks

Changed in nova (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Andrew Glen-Young (aglenyoung) wrote :

@Adam:

The upgrade was an upgrade of the Ubuntu packages from the Precise/Essex (i.e. _not_ between Openstack releases). There were instances running at the time.

Revision history for this message
Thierry Carrez (ttx) wrote :

@Andrew: there were quite a few changes around get_info over the last 10 days... and the way it looks currently it should just work... any chance you could reproduce on a more recent build ?

Changed in nova:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Andrew Glen-Young (aglenyoung) wrote :

@Thierry: I believe that new(er) Precise packages should be uploaded today (Friday). I'll test them early next week and let you know if I see this error.

Revision history for this message
Dan Prince (dan-prince) wrote :

This is a dup of 934427.

https://bugs.launchpad.net/nova/+bug/934276

The should be pretty simple:

+++ b/nova/compute/manager.py
@@ -2244,7 +2244,7 @@ class ComputeManager(manager.SchedulerDependentManager):
             db_power_state = db_instance['power_state']
             try:
                 vm_instance = self.driver.get_info(db_instance)
- vm_power_state = vm_instance.state
+ vm_power_state = vm_instance['state']

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.