OpenStack Compute (Nova)

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

Reported by Dan Prince on 2012-02-17
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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) on 2012-02-17
Changed in nova:
status: New → In Progress
assignee: nobody → Dan Prince (dan-prince)
Dan Prince (dan-prince) wrote :

I'm unable to reproduce this...

Changed in nova:
status: In Progress → Invalid
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
Dan Prince (dan-prince) on 2012-02-29
Changed in nova:
importance: Undecided → Medium
milestone: none → essex-rc1

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) on 2012-03-20
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers