_sync_power_states causes 'dict' object has no attribute 'state'

Bug #934276 reported by Dan Prince
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Prince

Bug Description

Running Essex on Fedora 16.

I'm seeing the following error in nova-compute.log:

2012-02-17 15:22:57,280 INFO nova.virt.libvirt.connection [-] [instance: 7f6e8d35-7741-4451-ae4d-6f98b17f1d86] Instance spawned successfully.
2012-02-17 15:23:15,552 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/site-packages/nova/manager.py", line 155, in periodic_tasks
(nova.manager): TRACE: task(self, context)
(nova.manager): TRACE: File "/usr/lib/python2.7/site-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:

Dan Prince (dan-prince)
Changed in nova:
status: New → In Progress
assignee: nobody → Dan Prince (dan-prince)
Revision history for this message
Dan Prince (dan-prince) wrote :

I'm unable to reproduce this...

Changed in nova:
status: In Progress → Invalid
Revision history for this message
Dan Prince (dan-prince) wrote :

Hit it again...

Silly me. The driver.get_info returns a hash. Should be an easy fix.

Changed in nova:
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → Medium
milestone: none → essex-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/4714
Committed: http://github.com/openstack/nova/commit/8a143d3a5ba4f2b2cd1c8a0a95cb0233083d0f8a
Submitter: Jenkins
Branch: master

commit 8a143d3a5ba4f2b2cd1c8a0a95cb0233083d0f8a
Author: Dan Prince <email address hidden>
Date: Wed Feb 29 14:51:13 2012 -0500

    Fix _sync_power_states to obtain correct 'state'.

    Update the compute manager to obtain state from the get_info
    dict correctly.

    Fixes 'dict' object has no attribute 'state' error that occur
    when syncing power states.

    Fixes LP Bug #934276.

    Change-Id: I3e3602018f4c38f78b48186bfca78eda362a9e54

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-rc1 → 2012.1
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.