summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2013-03-13 15:24:05 -0400
committerRussell Bryant <rbryant@redhat.com>2013-03-13 17:53:19 -0400
commita02b2d77d3bd40954c9c8dda680e2f7ce3e0327e (patch)
treeed4aea6cd9355435442684937cfdd2cbaecfcbd4 /nova/api
parentdced117ea919b74d9521ff422b4eb8a880474a0d (diff)
downloadnova-a02b2d77d3bd40954c9c8dda680e2f7ce3e0327e.tar.gz
nova-a02b2d77d3bd40954c9c8dda680e2f7ce3e0327e.tar.xz
nova-a02b2d77d3bd40954c9c8dda680e2f7ce3e0327e.zip
Don't log traceback on expected console error.
When requesting a console before an instance is read (while still building) we will get an InstanceNotReady exception. This exception is raised in the compute manager. The explanation in the exception will include the traceback from the manager side. If we use this as the explanation, we end up with a traceback in the API log, even though it's just an INFO log message. Use a more basic explanation, which is accuately more consistent with other cases of raising HTTP exceptions, which doesn't include a traceback. Fix bug 1154327. Change-Id: Idca443165983289a0df40970f68f95d5550ce72a
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/consoles.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/consoles.py b/nova/api/openstack/compute/contrib/consoles.py
index 264f0b270..0431a0694 100644
--- a/nova/api/openstack/compute/contrib/consoles.py
+++ b/nova/api/openstack/compute/contrib/consoles.py
@@ -49,7 +49,8 @@ class ConsolesController(wsgi.Controller):
except exception.InstanceNotFound as e:
raise webob.exc.HTTPNotFound(explanation=unicode(e))
except exception.InstanceNotReady as e:
- raise webob.exc.HTTPConflict(explanation=unicode(e))
+ raise webob.exc.HTTPConflict(
+ explanation=_('Instance not yet ready'))
return {'console': {'type': console_type, 'url': output['url']}}