This branch fixes https://bugs.launchpad.net/nova/+bug/751242.
According to the above URL, the solution is 'migrating' instances never be terminated. To do this, nova.compute.api.delete() should be modified.
This commit is contained in:
commit
9b449fc8a6
@ -370,11 +370,15 @@ class API(base.Base):
|
||||
instance_id)
|
||||
raise
|
||||
|
||||
if (instance['state_description'] == 'terminating'):
|
||||
if instance['state_description'] == 'terminating':
|
||||
LOG.warning(_("Instance %s is already being terminated"),
|
||||
instance_id)
|
||||
return
|
||||
|
||||
if instance['state_description'] == 'migrating':
|
||||
LOG.warning(_("Instance %s is being migrated"), instance_id)
|
||||
return
|
||||
|
||||
self.update(context,
|
||||
instance['id'],
|
||||
state_description='terminating',
|
||||
|
Loading…
Reference in New Issue
Block a user