diff options
| author | Hans Lindgren <hanlind@kth.se> | 2013-06-02 00:29:59 +0200 |
|---|---|---|
| committer | Hans Lindgren <hanlind@kth.se> | 2013-06-04 14:09:52 +0200 |
| commit | cdf10381caad217ae9eb99c69a4226e40ba81db4 (patch) | |
| tree | 279d3c0d8c6b5ef0e596e4ffe14a5d134718e7c4 /nova/compute | |
| parent | 5a510518d9e3097730466cfbf4ff25495c4a0302 (diff) | |
Fix a race where a soft deleted instance might be removed by mistake
When a soft deleted instance is restored there is a tiny risk that it
might be deleted if the reclaim periodic task runs at the same time.
This happens because the restore operation sets deleted_at to None
which makes the reclaim job think it is ok to delete the instance.
This can be resolved by restricting reclaims to only those instances
whose task_state is None.
Resolves bug 1186243.
Change-Id: Ia138e2d504b7482c46900583f019a32c70513245
Diffstat (limited to 'nova/compute')
| -rwxr-xr-x | nova/compute/manager.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index f9a1cc94d..be2f11ab6 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3989,6 +3989,7 @@ class ComputeManager(manager.SchedulerDependentManager): return filters = {'vm_state': vm_states.SOFT_DELETED, + 'task_state': None, 'host': self.host} instances = self.conductor_api.instance_get_all_by_filters(context, filters) |
