optimize the shelve code flow
Change-Id: I23d59ba4a33a183f99f651cc04fadefb3ea68722
This commit is contained in:
parent
2931516b75
commit
383bcbca70
@ -6407,7 +6407,7 @@ class ComputeManager(manager.Manager):
|
|||||||
instance.system_metadata['shelved_host'] = self.host
|
instance.system_metadata['shelved_host'] = self.host
|
||||||
instance.vm_state = vm_states.SHELVED
|
instance.vm_state = vm_states.SHELVED
|
||||||
instance.task_state = None
|
instance.task_state = None
|
||||||
if CONF.shelved_offload_time == 0:
|
if offload:
|
||||||
instance.task_state = task_states.SHELVING_OFFLOADING
|
instance.task_state = task_states.SHELVING_OFFLOADING
|
||||||
instance.power_state = self._get_power_state(instance)
|
instance.power_state = self._get_power_state(instance)
|
||||||
instance.save(expected_task_state=[
|
instance.save(expected_task_state=[
|
||||||
|
Loading…
Reference in New Issue
Block a user