diff options
| author | Brian Lamar <brian.lamar@rackspace.com> | 2011-08-24 12:26:05 -0400 |
|---|---|---|
| committer | Brian Lamar <brian.lamar@rackspace.com> | 2011-08-24 12:26:05 -0400 |
| commit | 007efcab4b668e7a4b1d26ff274693824f6d7445 (patch) | |
| tree | ad3d0c059a941bdb60e61aee2b02999f89e212db | |
| parent | 9304d2b4222cbb7225a95d57f307b125db988390 (diff) | |
Attempt to fix issue when deleting an instance when it's still in BUILD.
| -rw-r--r-- | nova/compute/manager.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 0a1dc13be..802d141ef 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -429,10 +429,15 @@ class ComputeManager(manager.SchedulerDependentManager): return current_power_state = self._get_power_state(context, instance) + if current_power_state == power_state.RUNNING: + vm_state = vm_states.ACTIVE + else: + vm_state = vm_states.BUILDING + self._instance_update(context, instance_id, power_state=current_power_state, - vm_state=vm_states.ACTIVE, + vm_state=vm_state, task_state=None, launched_at=utils.utcnow()) |
