diff options
| author | David Ripton <dripton@redhat.com> | 2013-06-03 09:23:13 -0400 |
|---|---|---|
| committer | David Ripton <dripton@redhat.com> | 2013-06-03 09:23:13 -0400 |
| commit | 361d116d820939207a0b01399c3ce50c7bc30dcd (patch) | |
| tree | 9b4aaf5adfd69f0bdf3781d34635932899d48255 | |
| parent | 0afcc051a99443004510458da32e507385d58873 (diff) | |
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
| -rw-r--r-- | nova/openstack/common/rpc/impl_qpid.py | 8 |
1 files changed, 7 insertions, 1 deletions
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): |
