Merge "Opitimize exception when failed to update_claim"

This commit is contained in:
Zuul 2018-08-16 04:00:07 +00:00 committed by Gerrit Code Review
commit c35ada472b
1 changed files with 3 additions and 1 deletions

View File

@ -835,7 +835,9 @@ class Manager(periodic_task.PeriodicTasks):
container.save(context)
return container
except exception.ResourcesUnavailable as e:
raise exception.Conflict(six.text_type(e))
with excutils.save_and_reraise_exception():
LOG.exception("Update container resource claim failed: %s",
six.text_type(e))
except exception.DockerError as e:
LOG.error("Error occurred while calling docker API: %s",
six.text_type(e))