Merge "Don't wait for vif plug events during _hard_reboot" into stable/ocata

This commit is contained in:
Zuul 2018-02-05 23:45:09 +00:00 committed by Gerrit Code Review
commit 5853222281
2 changed files with 8 additions and 2 deletions

View File

@ -11686,7 +11686,7 @@ class LibvirtConnTestCase(test.NoDBTestCase):
}
mock_create_domain_and_network.assert_called_once_with(self.context,
dummyxml, instance, network_info, mock_disk_info,
block_device_info=block_device_info)
block_device_info=block_device_info, vifs_already_plugged=True)
@mock.patch('oslo_utils.fileutils.ensure_tree')
@mock.patch('oslo_service.loopingcall.FixedIntervalLoopingCall')

View File

@ -2475,9 +2475,15 @@ class LibvirtDriver(driver.ComputeDriver):
# Initialize all the necessary networking, block devices and
# start the instance.
# NOTE(melwitt): Pass vifs_already_plugged=True here even though we've
# unplugged vifs earlier. The behavior of neutron plug events depends
# on which vif type we're using and we are working with a stale network
# info cache here, so won't rely on waiting for neutron plug events.
# vifs_already_plugged=True means "do not wait for neutron plug events"
self._create_domain_and_network(context, xml, instance, network_info,
disk_info,
block_device_info=block_device_info)
block_device_info=block_device_info,
vifs_already_plugged=True)
self._prepare_pci_devices_for_use(
pci_manager.get_instance_pci_devs(instance, 'all'))