[openstack-nova] include upstream patch for test day issue

Pádraig Brady pbrady at fedoraproject.org
Thu Mar 8 16:23:02 UTC 2012


commit 11ec99fa3c3cbffc70b2144d48c3f92c234c96c7
Author: Pádraig Brady <P at draigBrady.com>
Date:   Thu Mar 8 16:16:56 2012 +0000

    include upstream patch for test day issue
    
    Include Dan Prince's fix for the following issue:
    
    /var/log/nova/compute.log:(nova.manager): TRACE:
    AttributeError: 'dict' object has no attribute 'state'

 ...sync_power_states-to-obtain-correct-state.patch |   31 ++++++++++++++++++++
 openstack-nova.spec                                |    7 ++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/0005-Fix-_sync_power_states-to-obtain-correct-state.patch b/0005-Fix-_sync_power_states-to-obtain-correct-state.patch
new file mode 100644
index 0000000..325a7c2
--- /dev/null
+++ b/0005-Fix-_sync_power_states-to-obtain-correct-state.patch
@@ -0,0 +1,31 @@
+From 3c30ddddb1329ee0893aea3b2f2b02741542993c Mon Sep 17 00:00:00 2001
+From: Dan Prince <dprince at redhat.com>
+Date: Wed, 29 Feb 2012 14:51:13 -0500
+Subject: [PATCH] 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
+---
+ nova/compute/manager.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index 2221946..3df5852 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -2242,7 +2242,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"),
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 9b5e52d..784451d 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -5,7 +5,7 @@ Version:          2012.1
 # The Release is in form 0.X.tag as per:
 #   http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages
 # So for prereleases always increment X
-Release:          0.7.e4%{?dist}
+Release:          0.8.e4%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -38,6 +38,7 @@ Patch0001: 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
 Patch0002: 0002-Add-VIF-and-interface-drivers-for-the-Linux-Bridge-p.patch
 Patch0003: 0003-Adds-soft-reboot-support-to-libvirt.patch
 Patch0004: 0004-Allows-new-style-config-to-be-used-for-flagfile.patch
+Patch0005: 0005-Fix-_sync_power_states-to-obtain-correct-state.patch
 
 BuildArch:        noarch
 BuildRequires:    intltool
@@ -177,6 +178,7 @@ This package contains documentation files for nova.
 %patch0002 -p1
 %patch0003 -p1
 %patch0004 -p1
+%patch0005 -p1
 
 find . \( -name .gitignore -o -name .placeholder \) -delete
 
@@ -367,6 +369,9 @@ fi
 %endif
 
 %changelog
+* Fri Mar  8 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-0.8.e4
+- Include an upstream fix for errors logged when syncing power states
+
 * Fri Mar  6 2012 Alan Pevec <apevec at redhat.com> - 2012.1-0.7.e4
 - Fixup permissions on nova config files
 


More information about the scm-commits mailing list