[openstack-heat/f21] Add patch to catch MessagingError (rhbz#1086001)

Ryan Brown ryansb at fedoraproject.org
Tue Aug 12 18:54:34 UTC 2014


commit 6496ce264f46fdf4b1105ded9b41ecbfbb0c2441
Author: Ryan S. Brown <rybrown at redhat.com>
Date:   Tue Aug 12 14:50:37 2014 -0400

    Add patch to catch MessagingError (rhbz#1086001)
    
    Update patches from f21-patches, bump to 2014.1.2-0.5

 ...-ensure-reconnect-to-catch-MessagingError.patch |   54 ++++++++++++++++++++
 openstack-heat.spec                                |    7 ++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/0004-Update-ensure-reconnect-to-catch-MessagingError.patch b/0004-Update-ensure-reconnect-to-catch-MessagingError.patch
new file mode 100644
index 0000000..0cb609d
--- /dev/null
+++ b/0004-Update-ensure-reconnect-to-catch-MessagingError.patch
@@ -0,0 +1,54 @@
+From e4715913e46e02986f12a534a061d51ea4614119 Mon Sep 17 00:00:00 2001
+From: Jeff Peeler <jpeeler at redhat.com>
+Date: Thu, 10 Apr 2014 18:05:37 -0400
+Subject: [PATCH] Update ensure()/reconnect() to catch MessagingError
+
+The error handling code that gets connections reset if necessary
+caught ConnectionError. It really needs to catch MessagingError,
+which ConnectionError inherits from. There are other types of
+MessagingErrors that may occur, such as InternalError, and they need
+to cause the connection to reset, as well.
+
+This fix has already been merged into oslo.messaging.
+https://bugs.launchpad.net/oslo.messaging/+bug/1303890
+
+Change-Id: I121aaf87dfaec978d6313d095f5cf99ad8e3cec4
+Resolves: rhbz#1086001
+Reviewed-on: https://code.engineering.redhat.com/gerrit/29330
+Tested-by: RHOS Jenkins <apevec+rhosci at redhat.com>
+Reviewed-by: Zane Bitter <zbitter at redhat.com>
+---
+ heat/openstack/common/rpc/impl_qpid.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/heat/openstack/common/rpc/impl_qpid.py b/heat/openstack/common/rpc/impl_qpid.py
+index 82b7678..2a7b5cc 100644
+--- a/heat/openstack/common/rpc/impl_qpid.py
++++ b/heat/openstack/common/rpc/impl_qpid.py
+@@ -504,7 +504,7 @@ class Connection(object):
+             if self.connection.opened():
+                 try:
+                     self.connection.close()
+-                except qpid_exceptions.ConnectionError:
++                except qpid_exceptions.MessagingError:
+                     pass
+ 
+             broker = self.brokers[next(self.next_broker_indices)]
+@@ -512,7 +512,7 @@ class Connection(object):
+             try:
+                 self.connection_create(broker)
+                 self.connection.open()
+-            except qpid_exceptions.ConnectionError as e:
++            except qpid_exceptions.MessagingError as e:
+                 msg_dict = dict(e=e, delay=delay)
+                 msg = _("Unable to connect to AMQP server: %(e)s. "
+                         "Sleeping %(delay)s seconds") % msg_dict
+@@ -540,7 +540,7 @@ class Connection(object):
+             try:
+                 return method(*args, **kwargs)
+             except (qpid_exceptions.Empty,
+-                    qpid_exceptions.ConnectionError) as e:
++                    qpid_exceptions.MessagingError) as e:
+                 if error_callback:
+                     error_callback(e)
+                 self.reconnect()
diff --git a/openstack-heat.spec b/openstack-heat.spec
index 3e117e6..580a702 100644
--- a/openstack-heat.spec
+++ b/openstack-heat.spec
@@ -8,7 +8,7 @@
 Name:		openstack-heat
 Summary:	OpenStack Orchestration (heat)
 Version:	2014.1.2
-Release:	0.4%{?dist}
+Release:	0.5%{?dist}
 License:	ASL 2.0
 Group:		System Environment/Base
 URL:		http://www.openstack.org
@@ -36,6 +36,7 @@ Source20:   heat-dist.conf
 Patch0001: 0001-Switch-to-using-M2Crypto.patch
 Patch0002: 0002-remove-pbr-runtime-dependency.patch
 Patch0003: 0003-Add-heat-keystone-setup-domain-script.patch
+Patch0004: 0004-Update-ensure-reconnect-to-catch-MessagingError.patch
 
 BuildArch: noarch
 BuildRequires: git
@@ -92,6 +93,7 @@ Requires: %{name}-api-cloudwatch = %{version}-%{release}
 %patch0001 -p1
 %patch0002 -p1
 %patch0003 -p1
+%patch0004 -p1
 
 sed -i s/REDHATHEATVERSION/%{version}/ heat/version.py
 sed -i s/REDHATHEATRELEASE/%{release}/ heat/version.py
@@ -505,6 +507,9 @@ fi
 
 
 %changelog
+* Tue Aug 12 2014 Ryan S. Brown <rybrown at redhat.com> - 2014.1.2-0.5
+- add qpid for rhbz#1086001, which caused connections not to be reset
+
 * Mon Aug 11 2014 Ryan S. Brown <rybrown at redhat.com> - 2014.1.2-0.4
 - Merge epel and fedora specfiles
 


More information about the scm-commits mailing list