summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2012-02-29 14:51:13 -0500
committerDan Prince <dprince@redhat.com>2012-02-29 14:54:26 -0500
commit8a143d3a5ba4f2b2cd1c8a0a95cb0233083d0f8a (patch)
tree69f3b8865af08f383ea2c32aa37991ff7543fd63
parent9540a8c2913bb0efc59d34c5f72022dffa9dcb0a (diff)
downloadnova-8a143d3a5ba4f2b2cd1c8a0a95cb0233083d0f8a.tar.gz
nova-8a143d3a5ba4f2b2cd1c8a0a95cb0233083d0f8a.tar.xz
nova-8a143d3a5ba4f2b2cd1c8a0a95cb0233083d0f8a.zip
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
-rw-r--r--nova/compute/manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index d06786ca0..a4a18f1f8 100644
--- a/nova/compute/manager.py
+++ 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']
except exception.InstanceNotFound:
LOG.warn(_("Instance found in database but not known by "
"hypervisor. Setting power state to NOSTATE"),