From f0c9c85760605f0b7460d9bc08ac79487703a6fd Mon Sep 17 00:00:00 2001 From: Rafi Khardalian Date: Tue, 5 Feb 2013 09:40:15 +0000 Subject: Recache or rebuild missing images on hard_reboot The primary purpose of this change is to provide the ability to re-cache missing backing files on hard_reboot. The old pre_block_migration function was already performing a very similar operation. That function has been refactored to be idempotent and renamed to _create_images_and_backing. The pre_block_migration function is a wrapper, with some additional checking, around the renamed function. Image backend was also adjusted to look for either a missing backing file or disk image, recaching or creating accordingly. It should also be idempotent, never clobbering existing images. Change-Id: Icf4c488d6db59e732b463d08d0606b428ee1e7b9 --- nova/compute/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 nova/compute/manager.py (limited to 'nova/compute') diff --git a/nova/compute/manager.py b/nova/compute/manager.py old mode 100644 new mode 100755 index 605ebab6c..572868c58 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1479,7 +1479,8 @@ class ComputeManager(manager.SchedulerDependentManager): context=context, instance=instance) try: - self.driver.reboot(instance, self._legacy_nw_info(network_info), + self.driver.reboot(context, instance, + self._legacy_nw_info(network_info), reboot_type, block_device_info) except Exception, exc: LOG.error(_('Cannot reboot instance: %(exc)s'), locals(), -- cgit