diff --git a/nova_powervm/tests/virt/powervm/test_driver.py b/nova_powervm/tests/virt/powervm/test_driver.py index e6232f69..f1df41c5 100644 --- a/nova_powervm/tests/virt/powervm/test_driver.py +++ b/nova_powervm/tests/virt/powervm/test_driver.py @@ -1769,7 +1769,7 @@ class TestPowerVMDriver(test.TestCase): 'block_mig', 'migrate_data') self.lpm.migration_abort.assert_called_once_with() mock_rec_meth.assert_called_once_with( - 'context', self.lpm_inst, 'dest', mock.ANY, mock.ANY) + 'context', self.lpm_inst, 'dest', migrate_data=mock.ANY) self.lpm.rollback_live_migration.assert_called_once_with('context') self.assertEqual(0, mock_post_meth.call_count) @@ -1783,7 +1783,7 @@ class TestPowerVMDriver(test.TestCase): 'context', self.lpm_inst, 'dest', mock_post_meth, mock_rec_meth, 'block_mig', 'migrate_data') mock_rec_meth.assert_called_once_with( - 'context', self.lpm_inst, 'dest', mock.ANY, mock.ANY) + 'context', self.lpm_inst, 'dest', migrate_data=mock.ANY) self.lpm.rollback_live_migration.assert_called_once_with('context') self.assertEqual(0, mock_post_meth.call_count) @@ -1799,7 +1799,7 @@ class TestPowerVMDriver(test.TestCase): 'context', self.lpm_inst, 'dest', mock_post_meth, mock_rec_meth, 'block_mig', 'migrate_data') mock_rec_meth.assert_called_once_with( - 'context', self.lpm_inst, 'dest', mock.ANY, mock.ANY) + 'context', self.lpm_inst, 'dest', migrate_data=mock.ANY) self.lpm.rollback_live_migration.assert_called_once_with('context') self.assertEqual(0, mock_post_meth.call_count) diff --git a/nova_powervm/virt/powervm/driver.py b/nova_powervm/virt/powervm/driver.py index 859a5ba1..aaafb362 100644 --- a/nova_powervm/virt/powervm/driver.py +++ b/nova_powervm/virt/powervm/driver.py @@ -1484,14 +1484,14 @@ class PowerVMDriver(driver.ComputeDriver): mig.migration_abort() self._migration_exception_util(context, instance, dest, recover_method, - block_migration, migrate_data, + migrate_data, mig, ex=timeout_ex) except Exception as e: LOG.exception("PowerVM error during live migration.", instance=instance) self._migration_exception_util(context, instance, dest, recover_method, - block_migration, migrate_data, + migrate_data, mig, ex=e) LOG.debug("Calling post live migration method.", instance=instance) @@ -1502,8 +1502,7 @@ class PowerVMDriver(driver.ComputeDriver): del self.live_migrations[instance.uuid] def _migration_exception_util(self, context, instance, dest, - recover_method, block_migration, - migrate_data, mig, ex): + recover_method, migrate_data, mig, ex): """Migration exception utility. :param context: security context @@ -1514,7 +1513,6 @@ class PowerVMDriver(driver.ComputeDriver): :param recover_method: recovery method when any exception occurs. expected nova.compute.manager._rollback_live_migration. - :param block_migration: if true, migrate VM disk. :param migrate_data: a LiveMigrateData object :param mig: live_migration object :param ex: exception reason @@ -1523,8 +1521,7 @@ class PowerVMDriver(driver.ComputeDriver): LOG.warning(_LW("Rolling back live migration."), instance=instance) try: mig.rollback_live_migration(context) - recover_method(context, instance, dest, block_migration, - migrate_data) + recover_method(context, instance, dest, migrate_data=migrate_data) except Exception: LOG.exception("PowerVM error rolling back live migration.", instance=instance)