summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorHaiwei Xu <xu-haiwei@mxw.nes.nec.co.jp>2013-03-05 03:52:37 +0000
committerHaiwei Xu <xu-haiwei@mxw.nes.nec.co.jp>2013-03-13 11:05:19 +0900
commit2784fff6300d79d7100e6413f0c3120970134b86 (patch)
tree0b3a29756f5661fb181b09b85d0b3396b1c74125 /nova/openstack
parentb0694b33d3a7c32b582030d44231ef31bcc8ec60 (diff)
downloadnova-2784fff6300d79d7100e6413f0c3120970134b86.tar.gz
nova-2784fff6300d79d7100e6413f0c3120970134b86.tar.xz
nova-2784fff6300d79d7100e6413f0c3120970134b86.zip
Return error details to users in "dns-create-private-domain"
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: I76d4a938e66bfaf44423f7586e00db2caf9f5dde
Diffstat (limited to 'nova/openstack')
-rw-r--r--nova/openstack/common/rpc/amqp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/nova/openstack/common/rpc/amqp.py b/nova/openstack/common/rpc/amqp.py
index 3f25eed67..19d919d87 100644
--- a/nova/openstack/common/rpc/amqp.py
+++ b/nova/openstack/common/rpc/amqp.py
@@ -406,9 +406,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):