Merge "Handle GET /containers/<UUID> when host is down"

This commit is contained in:
Zuul 2019-09-24 01:58:43 +00:00 committed by Gerrit Code Review
commit aaa4ae8bf8
2 changed files with 2 additions and 7 deletions

View File

@ -234,8 +234,8 @@ class ContainersController(base.Controller):
compute_api = pecan.request.compute_api
try:
container = compute_api.container_show(context, container)
except exception.ContainerHostNotUp:
raise exception.ServerNotUsable
except exception.ContainerHostNotUp as e:
LOG.error("Failed to get container details: %s", str(e))
return view.format_container(context, pecan.request.host_url,
container)

View File

@ -713,11 +713,6 @@ class ContainerActionEventNotFound(ZunException):
message = _("Event %(event)s not found for action id %(action_id)s")
class ServerNotUsable(ZunException):
message = _("Zun server not usable")
code = 404
class OverQuota(ZunException):
message = _("Quota exceeded for resources: %(overs)s")
code = 403