Merge "Pass more accurate error message to DeleteErrorException"
This commit is contained in:
commit
a2a3ff70ad
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue