diff --git a/zun/compute/claims.py b/zun/compute/claims.py index d3c08e054..e94f23ec7 100644 --- a/zun/compute/claims.py +++ b/zun/compute/claims.py @@ -79,7 +79,7 @@ class Claim(NopClaim): self._pci_requests = pci_requests # Check claim at constructor to avoid mess code - # Raise exception ComputeResourcesUnavailable if claim failed + # Raise exception ResourcesUnavailable if claim failed self._claim_test(resources, limits) @property diff --git a/zun/compute/manager.py b/zun/compute/manager.py index ccfd53b07..cdfbaf53d 100644 --- a/zun/compute/manager.py +++ b/zun/compute/manager.py @@ -309,9 +309,7 @@ class Manager(periodic_task.PeriodicTasks): context, container, requested_networks, requested_volumes, sandbox, limits, reraise) return created_container - except Exception as e: - # Other exception has handled in create sandbox and create base, - # exception occured here only can be the claim failed. + except exception.ResourcesUnavailable as e: with excutils.save_and_reraise_exception(reraise=reraise): LOG.exception("Container resource claim failed: %s", six.text_type(e))