diff -Nru python-oslo.messaging-9.7.1/debian/changelog python-oslo.messaging-9.7.1/debian/changelog --- python-oslo.messaging-9.7.1/debian/changelog 2021-01-05 15:43:18.000000000 +0530 +++ python-oslo.messaging-9.7.1/debian/changelog 2022-01-12 15:26:06.000000000 +0530 @@ -1,3 +1,10 @@ +python-oslo.messaging (9.7.1-0ubuntu3~cloud2) bionic-train; urgency=medium + + * Catch ConnectionForced Exception (LP: #1883038) + - d/p/0001-Catch-ConnectionForced-Exception.patch + + -- Hemanth Nakkina Wed, 12 Jan 2022 15:26:06 +0530 + python-oslo.messaging (9.7.1-0ubuntu3~cloud1) bionic-train; urgency=medium [ Corey Bryant ] diff -Nru python-oslo.messaging-9.7.1/debian/patches/0001-Catch-ConnectionForced-Exception.patch python-oslo.messaging-9.7.1/debian/patches/0001-Catch-ConnectionForced-Exception.patch --- python-oslo.messaging-9.7.1/debian/patches/0001-Catch-ConnectionForced-Exception.patch 1970-01-01 05:30:00.000000000 +0530 +++ python-oslo.messaging-9.7.1/debian/patches/0001-Catch-ConnectionForced-Exception.patch 2022-01-12 15:25:47.000000000 +0530 @@ -0,0 +1,63 @@ +From 54ced5361b49fb9b0cf53ff2e6f5825ba7ae513a Mon Sep 17 00:00:00 2001 +From: shenjiatong +Date: Tue, 30 Jun 2020 08:56:26 +0800 +Subject: [PATCH] Catch ConnectionForced Exception + +Occasionally I saw large number of connectionforced exceptions. +such exceptions cannot be healed automatically and requires a reboot. +catch it and ensure connection established. + +Changes: + oslo_messaging/_drivers/impl_rabbit.py + +NOTE(stephenfin): We need to add the 'absolute_import' future to disable +the legacy import flow. Without this, the import of 'amqp.exceptions' in +'oslo_messaging._drivers.impl_rabbit' attempts to import 'exceptions' +from the sibling module, 'oslo_messaging._drivers.amqp', instead of the +top-level 'amqp' module. Thank God for Python 3.x, eh? More information +is available at [1], for those curious enough. + +[1] https://stackoverflow.com/q/33743880/ + +Change-Id: I5c468d10230f05438df780e045f1e92662edf070 +Closes-Bug: #1883038 +(cherry picked from commit 26e8bb4cc9097fddf3c2e34599b131e3f5d73867) +(cherry picked from commit 360deb89a7e95d332267564b486219e389a793f7) +--- + oslo_messaging/_drivers/impl_rabbit.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py +index 6b89f89d..1bd1a101 100644 +--- a/oslo_messaging/_drivers/impl_rabbit.py ++++ b/oslo_messaging/_drivers/impl_rabbit.py +@@ -12,6 +12,8 @@ + # License for the specific language governing permissions and limitations + # under the License. + ++from __future__ import absolute_import ++ + import contextlib + import errno + import functools +@@ -26,6 +28,7 @@ import threading + import time + import uuid + ++from amqp import exceptions as amqp_exec + import kombu + import kombu.connection + import kombu.entity +@@ -1036,7 +1039,8 @@ class Connection(object): + except (socket.timeout, + ConnectRefuseError, + OSError, +- kombu.exceptions.OperationalError) as exc: ++ kombu.exceptions.OperationalError, ++ amqp_exec.ConnectionForced) as exc: + LOG.info("A recoverable connection/channel error " + "occurred, trying to reconnect: %s", exc) + self.ensure_connection() +-- +2.25.1 + diff -Nru python-oslo.messaging-9.7.1/debian/patches/series python-oslo.messaging-9.7.1/debian/patches/series --- python-oslo.messaging-9.7.1/debian/patches/series 2021-01-05 15:43:18.000000000 +0530 +++ python-oslo.messaging-9.7.1/debian/patches/series 2022-01-12 15:25:47.000000000 +0530 @@ -1,2 +1,3 @@ no-functional-test.patch 0001-Use-default-exchange-for-direct-messaging.patch +0001-Catch-ConnectionForced-Exception.patch