Merge "ForceDelete Instance"
This commit is contained in:
commit
f2b4007837
@ -445,9 +445,12 @@ echo -e '%s\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
|
||||
return False
|
||||
|
||||
status = self.get_status(server)
|
||||
if status in ("DELETED", "SOFT_DELETED"):
|
||||
if status == 'DELETED':
|
||||
return True
|
||||
if status == 'ERROR':
|
||||
|
||||
if status == 'SOFT_DELETED':
|
||||
self.client().servers.force_delete(server_id)
|
||||
elif status == 'ERROR':
|
||||
fault = getattr(server, 'fault', {})
|
||||
message = fault.get('message', 'Unknown')
|
||||
code = fault.get('code')
|
||||
|
@ -287,6 +287,8 @@ class FakeSessionClient(base_client.SessionClient):
|
||||
assert set(body[action].keys()) == set(['host',
|
||||
'block_migration',
|
||||
'disk_over_commit'])
|
||||
elif action == 'forceDelete':
|
||||
assert body is not None
|
||||
else:
|
||||
raise AssertionError("Unexpected server action: %s" % action)
|
||||
return (resp, _body)
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- Force delete the nova instance.
|
||||
If a resource is related with a nova instance which
|
||||
is in 'SOFT_DELETED' status, the resource can't be
|
||||
deleted, when nova config 'reclaim_instance_interval'.
|
||||
so, force-delete the nova instance, and then all the
|
||||
resources are related with the instance would be
|
||||
processed properly.
|
Loading…
Reference in New Issue
Block a user