From 361d116d820939207a0b01399c3ce50c7bc30dcd Mon Sep 17 00:00:00 2001 From: David Ripton Date: Mon, 3 Jun 2013 09:23:13 -0400 Subject: Silence exceptions from qpid connection.close() (from oslo) This is commit 15d8d698b7 in oslo-incubator. Fixes bug 1185465 Don't log exceptions that happen during connection.close(). They're not surprising (a closed socket can't be read or written), don't require sysadmin attention, and provide red herrings in the logs to distract from finding real root causes of problems. Change-Id: Ia0e25fbc11094b5ad5d6d2cf7d0e786acb3df1f6 --- nova/openstack/common/rpc/impl_qpid.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nova/openstack/common/rpc/impl_qpid.py b/nova/openstack/common/rpc/impl_qpid.py index 2863f23a5..efcc52264 100644 --- a/nova/openstack/common/rpc/impl_qpid.py +++ b/nova/openstack/common/rpc/impl_qpid.py @@ -384,7 +384,13 @@ class Connection(object): """Close/release this connection""" self.cancel_consumer_thread() self.wait_on_proxy_callbacks() - self.connection.close() + try: + self.connection.close() + except Exception: + # NOTE(dripton) Logging exceptions that happen during cleanup just + # causes confusion; there's really nothing useful we can do with + # them. + pass self.connection = None def reset(self): -- cgit