diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-29 16:35:39 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-29 16:35:39 -0700 |
| commit | 5e6c69bc7a7e5ddaa1bf0fa83f64da116343dba8 (patch) | |
| tree | 1500a59a86efc43030a8f8910451da3630a2123b /nova/compute | |
| parent | e5f108058f9b085571330dff3c3e3e3e57d2e5ed (diff) | |
Narrowly focused bugfix - don't lose libvirt instances on host reboot or if they crash
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index e0a5e2b3f..72f04ecb1 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1088,12 +1088,14 @@ class ComputeManager(manager.SchedulerDependentManager): db_instance['id'], vm_state) - if vm_state == power_state.SHUTOFF: - # TODO(soren): This is what the compute manager does when you - # terminate an instance. At some point I figure we'll have a - # "terminated" state and some sort of cleanup job that runs - # occasionally, cleaning them out. - self.db.instance_destroy(context, db_instance['id']) + # NOTE(justinsb): We no longer auto-remove SHUTOFF instances + # It's quite hard to get them back when we do. + #if vm_state == power_state.SHUTOFF: + # # TODO(soren): This is what the compute manager does when you + # # terminate an instance. At some point I figure we'll have a + # # "terminated" state and some sort of cleanup job that runs + # # occasionally, cleaning them out. + # self.db.instance_destroy(context, db_instance['id']) # Are there VMs not in the DB? for vm_not_found_in_db in vms_not_found_in_db: |
