summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2013-04-10 21:16:15 +0000
committerJoe Gordon <jogo@cloudscaling.com>2013-04-10 21:16:15 +0000
commitc1ef86ec7bd415fc86892f22df21f322d913cd52 (patch)
treee407b00cb9bab625c949bd8aa84626989e267932 /nova
parent526d879237abb30671b73147337c20538a70d2b8 (diff)
downloadnova-c1ef86ec7bd415fc86892f22df21f322d913cd52.tar.gz
nova-c1ef86ec7bd415fc86892f22df21f322d913cd52.tar.xz
nova-c1ef86ec7bd415fc86892f22df21f322d913cd52.zip
Don't hide stacktraces for unexpected errors in rescue
Prevent rescue commands from hiding stacktraces for unexpected errors. Before this the wrap_errors function would catch unexpected errors and hide them, with a generic HTTPInternalServerError without any stacktrace. Change-Id: I80e0ae8257117a3e5a4c946b38870aad0e58cc12
Diffstat (limited to 'nova')
-rw-r--r--nova/api/openstack/compute/contrib/rescue.py2
-rw-r--r--nova/api/openstack/extensions.py12
2 files changed, 0 insertions, 14 deletions
diff --git a/nova/api/openstack/compute/contrib/rescue.py b/nova/api/openstack/compute/contrib/rescue.py
index 87d838bdf..26b35b6be 100644
--- a/nova/api/openstack/compute/contrib/rescue.py
+++ b/nova/api/openstack/compute/contrib/rescue.py
@@ -45,7 +45,6 @@ class RescueController(wsgi.Controller):
raise exc.HTTPNotFound(msg)
@wsgi.action('rescue')
- @exts.wrap_errors
def _rescue(self, req, id, body):
"""Rescue an instance."""
context = req.environ["nova.context"]
@@ -70,7 +69,6 @@ class RescueController(wsgi.Controller):
return {'adminPass': password}
@wsgi.action('unrescue')
- @exts.wrap_errors
def _unrescue(self, req, id, body):
"""Unrescue an instance."""
context = req.environ["nova.context"]
diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py
index b2cdacd1e..e7c806388 100644
--- a/nova/api/openstack/extensions.py
+++ b/nova/api/openstack/extensions.py
@@ -309,18 +309,6 @@ class ResourceExtension(object):
self.inherits = inherits
-def wrap_errors(fn):
- """Ensure errors are not passed along."""
- def wrapped(*args, **kwargs):
- try:
- return fn(*args, **kwargs)
- except webob.exc.HTTPException:
- raise
- except Exception:
- raise webob.exc.HTTPInternalServerError()
- return wrapped
-
-
def load_standard_extensions(ext_mgr, logger, path, package, ext_list=None):
"""Registers all standard API extensions."""