From 14440efb229028a5d3d4e4a1bc0c38c9a2bb5ef0 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 18 Jan 2017 18:47:24 -0500 Subject: [PATCH] hyperv: make sure to plug OVS VIFs after resize/migrate Since the network_info wasn't getting passed to vmops.power_on after a resize/cold migrate confirmation, the OVS VIFs weren't getting plugged. Change-Id: Ia9b7dc11cd74ba896a7254c16a95b7a834a28475 Closes-Bug: #1657424 (cherry picked from commit 568a682e5efa6e4fd49b69e02cbd80f1d8a96c63) --- nova/tests/unit/virt/hyperv/test_migrationops.py | 2 +- nova/virt/hyperv/migrationops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/tests/unit/virt/hyperv/test_migrationops.py b/nova/tests/unit/virt/hyperv/test_migrationops.py index 4d776a9d27cd..a054b85da210 100644 --- a/nova/tests/unit/virt/hyperv/test_migrationops.py +++ b/nova/tests/unit/virt/hyperv/test_migrationops.py @@ -446,7 +446,7 @@ class MigrationOpsTestCase(test_base.HyperVBaseTestCase): mock_instance.name, get_image_vm_gen.return_value, block_device_info) self._migrationops._vmops.power_on.assert_called_once_with( - mock_instance) + mock_instance, network_info=mock.sentinel.network_info) def test_finish_migration(self): self._check_finish_migration(disk_type=constants.DISK) diff --git a/nova/virt/hyperv/migrationops.py b/nova/virt/hyperv/migrationops.py index 62f9f38ca649..0c6cb28c6a74 100644 --- a/nova/virt/hyperv/migrationops.py +++ b/nova/virt/hyperv/migrationops.py @@ -298,7 +298,7 @@ class MigrationOps(object): self._check_and_attach_config_drive(instance, vm_gen) self._vmops.set_boot_order(instance_name, vm_gen, block_device_info) if power_on: - self._vmops.power_on(instance) + self._vmops.power_on(instance, network_info=network_info) def _check_ephemeral_disks(self, instance, ephemerals, resize_instance=False):