Merge "Pass more accurate error message to DeleteErrorException"

This commit is contained in:
Zuul 2019-06-14 22:17:51 +00:00 committed by Gerrit Code Review
commit a2a3ff70ad
2 changed files with 6 additions and 2 deletions

4
tempest/common/waiters.py Executable file → Normal file
View File

@ -121,7 +121,9 @@ def wait_for_server_termination(client, server_id, ignore_error=False):
'/'.join((server_status, str(task_state))),
time.time() - start_time)
if server_status == 'ERROR' and not ignore_error:
raise lib_exc.DeleteErrorException(resource_id=server_id)
raise lib_exc.DeleteErrorException(
"Server %s failed to delete and is in ERROR status" %
server_id)
if int(time.time()) - start_time >= client.build_timeout:
raise lib_exc.TimeoutException

View File

@ -212,7 +212,9 @@ class VolumesClient(base_client.BaseClient):
except lib_exc.NotFound:
return True
if volume["volume"]["status"] == "error_deleting":
raise lib_exc.DeleteErrorException(resource_id=id)
raise lib_exc.DeleteErrorException(
"Volume %s failed to delete and is in error_deleting status" %
volume['id'])
return False
@property