From e4e1c6a2f060a91899549b9643132abde27d033e Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 5 Mar 2015 14:44:00 -0800 Subject: [PATCH] libvirt: add comment for vifs_already_plugged=True in finish_migration Given we unplug VIFs in _cleanup_resize if the host has changed, it's confusing to pass vifs_already_plugged=True in finish_migration without some explanation of why we don't check to see if the host has changed before deciding what the value of vifs_already_plugged should be when creating the new domain and plugging VIFs again. After some discussion with Neutron cores, this is the explanation I've come up with, albeit not a great one, and indicates a gap in some of the nova/neutron integration story. Related-Bug: #1323658 Change-Id: I982b6bd0650f29f34c213b6eebbe066f7bd65815 --- nova/virt/libvirt/driver.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 5719f1f17363..6587e7e20d06 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -6351,6 +6351,11 @@ class LibvirtDriver(driver.ComputeDriver): image_meta, block_device_info=block_device_info, write_to_disk=True) + # NOTE(mriedem): vifs_already_plugged=True here, regardless of whether + # or not we've migrated to another host, because we unplug VIFs locally + # and the status change in the port might go undetected by the neutron + # L2 agent (or neutron server) so neutron may not know that the VIF was + # unplugged in the first place and never send an event. self._create_domain_and_network(context, xml, instance, network_info, disk_info, block_device_info=block_device_info,