Introducing ShutOff state in destroy flow

When an instance is deleted, internally partition gets
stopped first and then deleted. After the partition is
stopped before getting deleted, vm state is set to stopped
as well which will show it is instance Shutoff on instance
State

closes bug: 1661532
Change-Id: I56746e97320f02f1a7e9d7b396bb027c7a30ad68
This commit is contained in:
preethipy
2017-03-15 17:30:38 +05:30
committed by Sreeram Vancheeswaran
parent b340f23614
commit 9428434926

View File

@@ -310,6 +310,8 @@ class PartitionInstance(object):
# on DPM is fixed to return correct status on API return
self._loop_status_update(result, 5, 'stopped')
if (self.partition.properties['status'] == 'stopped'):
self.instance.vm_state = vm_states.STOPPED
self.instance.save()
self.partition.delete()
else:
errormsg = (_("Partition - %(partition)s status "