summaryrefslogtreecommitdiff
path: root/nova/compute/manager.py
diff options
context:
space:
mode:
authorBrian Lamar <brian.lamar@rackspace.com>2011-08-24 12:26:05 -0400
committerBrian Lamar <brian.lamar@rackspace.com>2011-08-24 12:26:05 -0400
commit007efcab4b668e7a4b1d26ff274693824f6d7445 (patch)
treead3d0c059a941bdb60e61aee2b02999f89e212db /nova/compute/manager.py
parent9304d2b4222cbb7225a95d57f307b125db988390 (diff)
downloadnova-007efcab4b668e7a4b1d26ff274693824f6d7445.tar.gz
Attempt to fix issue when deleting an instance when it's still in BUILD.
Diffstat (limited to 'nova/compute/manager.py')
-rw-r--r--nova/compute/manager.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 0a1dc13be9..802d141ef4 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())