Instances with delete_on_terminate volumes do not reschedule
Bug #1437516 reported by
Vish Ishaya
This bug report is a duplicate of:
Bug #1336127: The volumes will be deleted when creating a virtual machine fails with the parameter delete_on_termination being set true, which causes that the rescheduling fails.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Medium
|
Unassigned |
Bug Description
If you create an instance with attached delete_on_terminate volumes and it fails to launch on a host (due to a hardware or hypervisor issue) it will be rescheduled but the volumes will have already been deleted. The volumes should only be deleted if the instance is not going to be rescheduled (or perhaps not at all).
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → Triaged |
To post a comment you must log in.
I'm thinking something like the following
diff --git a/nova/ compute/ manager. py b/nova/ compute/ manager. py compute/ manager. py compute/ manager. py manager. Manager) :
reason= six.text_ type(exc_ info[1] )) BlockDeviceMapp ingList. get_by_ instance_ uuid( volumes( context, instance.uuid, bdms)
raise exc_info[0], exc_info[1], exc_info[2]
index 6f756e4..2e7aebb 100644
--- a/nova/
+++ b/nova/
@@ -1533,6 +1533,10 @@ class ComputeManager(
else:
# not re-scheduling, go to error:
+ if bdms is None:
+ bdms = objects.
+ context, instance.uuid)
+ self._cleanup_
# spawn success manager. Manager) :
@@ -1569,7 +1573,6 @@ class ComputeManager(
- self._cleanup_
except Exception:
# do not attempt retry if clean up failed:
with excutils.