Merge "remove _cleanup_running_deleted_instances repeat detach volume"

This commit is contained in:
Zuul 2018-03-23 14:21:15 +00:00 committed by Gerrit Code Review
commit 00e4d36155
2 changed files with 4 additions and 2 deletions

View File

@ -7423,7 +7423,8 @@ class ComputeManager(manager.Manager):
try:
self._shutdown_instance(context, instance, bdms,
notify=False)
self._cleanup_volumes(context, instance, bdms)
self._cleanup_volumes(context, instance, bdms,
detach=False)
except Exception as e:
LOG.warning("Periodic cleanup failed to delete "
"instance: %s",

View File

@ -6936,7 +6936,8 @@ class ComputeTestCase(BaseTestCase,
mock_shutdown.assert_has_calls([
mock.call(ctxt, inst1, bdms, notify=False),
mock.call(ctxt, inst2, bdms, notify=False)])
mock_cleanup.assert_called_once_with(ctxt, inst2, bdms)
mock_cleanup.assert_called_once_with(ctxt, inst2, bdms,
detach=False)
mock_get_uuid.assert_has_calls([
mock.call(ctxt, inst1.uuid, use_slave=True),
mock.call(ctxt, inst2.uuid, use_slave=True)])