diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-04-10 20:10:01 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-04-10 20:10:01 +0000 |
| commit | cba0a2abca400f16c13ea5fff4085d6c1048e36e (patch) | |
| tree | f71e6dd3f2bf1c4a7c4f8762e8d07ad52949d946 | |
| parent | 154ab6914bfc223cc432af856f60b62e72ff5d46 (diff) | |
| parent | 676b16bfe5ff41eb28d782c888c17dae6bdff76a (diff) | |
Merge "Fix error message in pre_live_migration."
| -rwxr-xr-x | nova/virt/libvirt/driver.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index c8494603e..2c08a913e 100755 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -3170,7 +3170,7 @@ class LibvirtDriver(driver.ComputeDriver): instance['user_id'], instance['project_id']) - def pre_live_migration(self, context, instance_ref, block_device_info, + def pre_live_migration(self, context, instance, block_device_info, network_info, migrate_data=None): """Preparation live migration.""" # Steps for volume backed instance live migration w/o shared storage. @@ -3185,18 +3185,18 @@ class LibvirtDriver(driver.ComputeDriver): if is_volume_backed and not (is_block_migration or is_shared_storage): # Create the instance directory on destination compute node. - instance_dir = libvirt_utils.get_instance_path(instance_ref) + instance_dir = libvirt_utils.get_instance_path(instance) if os.path.exists(instance_dir): raise exception.DestinationDiskExists(path=instance_dir) os.mkdir(instance_dir) # Touch the console.log file, required by libvirt. - console_file = self._get_console_log_path(instance_ref) + console_file = self._get_console_log_path(instance) libvirt_utils.file_open(console_file, 'a').close() # if image has kernel and ramdisk, just download # following normal way. - self._fetch_instance_kernel_ramdisk(context, instance_ref) + self._fetch_instance_kernel_ramdisk(context, instance) # Establishing connection to volume server. block_device_mapping = driver.block_device_info_get_mapping( @@ -3221,15 +3221,17 @@ class LibvirtDriver(driver.ComputeDriver): max_retry = CONF.live_migration_retry_count for cnt in range(max_retry): try: - self.plug_vifs(instance_ref, network_info) + self.plug_vifs(instance, network_info) break except exception.ProcessExecutionError: if cnt == max_retry - 1: raise else: - LOG.warn(_("plug_vifs() failed %(cnt)d." - "Retry up to %(max_retry)d for %(hostname)s.") - % locals()) + LOG.warn(_('plug_vifs() failed %(cnt)d. Retry up to ' + '%(max_retry)d.'), + {'cnt': cnt, + 'max_retry': max_retry}, + instance=instance) greenthread.sleep(1) def pre_block_migration(self, ctxt, instance, disk_info_json): |
