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. (cherry-picked from commit 568a682e5efa6e4fd49b69e02cbd80f1d8a96c63) Change-Id: I9097debeb68cb25dec27e7b3e979cf51d951c250 Closes-Bug: #1657424
This commit is contained in:
parent
8226eb34b1
commit
5eb0db9b36
|
@ -225,7 +225,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_and_update_disks(self, context, instance, vm_gen, image_meta,
|
||||
block_device_info, resize_instance=False):
|
||||
|
|
|
@ -324,7 +324,8 @@ class MigrationOpsTestCase(test_base.HyperVBaseTestCase):
|
|||
self._migrationops._vmops.set_boot_order.assert_called_once_with(
|
||||
mock_instance.name, get_image_vm_gen.return_value,
|
||||
mock.sentinel.block_device_info)
|
||||
self._vmops.power_on.assert_called_once_with(mock_instance)
|
||||
self._vmops.power_on.assert_called_once_with(
|
||||
mock_instance, network_info=mock.sentinel.network_info)
|
||||
|
||||
@ddt.data(constants.DISK, mock.sentinel.root_type)
|
||||
@mock.patch.object(migrationops.MigrationOps, '_check_base_disk')
|
||||
|
|
Loading…
Reference in New Issue