summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorHaiwei Xu <xu-haiwei@mxw.nes.nec.co.jp>2013-03-07 10:37:14 +0900
committerHaiwei Xu <xu-haiwei@mxw.nes.nec.co.jp>2013-03-11 09:27:47 +0900
commitb85e8303347b4ff16951e55e2be2d9b2d39d9678 (patch)
treed02feafa5dcc9e396db34affabe671ab38412a5a /openstack
parent622f79311787c8a0b02d4999ada66810a97246e0 (diff)
downloadoslo-b85e8303347b4ff16951e55e2be2d9b2d39d9678.tar.gz
oslo-b85e8303347b4ff16951e55e2be2d9b2d39d9678.tar.xz
oslo-b85e8303347b4ff16951e55e2be2d9b2d39d9678.zip
Keep exc_info() to prevent an internal error
Fixes bug 1135539 When SysLogHandler is configured in UDP socket mode, the user who doesn't have the admin privilege got the unexpecting internal server error(HTTP 500) in "nova dns-create-private-domain" command. This bug occurs as the call graph drew below: |--ProxyCallback._process_data():amqp.py |--LOG.exception() | : | |--BaseHub.switch():hub.py | |-- clear_sys_exc_info() | |--ctxt.reply(None, sys.exc_info(),..) | : | |--serialize_remote_exception():common.py |--failure_info#(None,None,None) The sys.exc_info() is cleared by the clear_sys_exc_info(), but it is called again by the ctxt.reply(). This patch prevents the internal error and returns the details of the forbidden error(HTTP 403) which is expected. Change-Id: I549b4b2365c53c401edc80bbe30bcde249d27b85
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/rpc/amqp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/openstack/common/rpc/amqp.py b/openstack/common/rpc/amqp.py
index 128c7d7..2dcb12b 100644
--- a/openstack/common/rpc/amqp.py
+++ b/openstack/common/rpc/amqp.py
@@ -443,9 +443,11 @@ class ProxyCallback(_ThreadPoolWithWait):
connection_pool=self.connection_pool,
log_failure=False)
except Exception:
- LOG.exception(_('Exception during message handling'))
- ctxt.reply(None, sys.exc_info(),
- connection_pool=self.connection_pool)
+ # sys.exc_info() is deleted by LOG.exception().
+ exc_info = sys.exc_info()
+ LOG.error(_('Exception during message handling'),
+ exc_info=exc_info)
+ ctxt.reply(None, exc_info, connection_pool=self.connection_pool)
class MulticallProxyWaiter(object):