diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 6f756e4..2e7aebb 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -1533,6 +1533,10 @@ class ComputeManager(manager.Manager): reason=six.text_type(exc_info[1]))
else:
# not re-scheduling, go to error:
+ if bdms is None:
+ bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
+ context, instance.uuid)
+ self._cleanup_volumes(context, instance.uuid, bdms) raise exc_info[0], exc_info[1], exc_info[2]
# spawn success
@@ -1569,7 +1573,6 @@ class ComputeManager(manager.Manager):
self._shutdown_instance(context, instance, bdms, requested_networks)
- self._cleanup_volumes(context, instance.uuid, bdms)
except Exception:
# do not attempt retry if clean up failed:
with excutils.save_and_reraise_exception():
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.