Skip to content

Commit

Permalink
libvirt: add comment for vifs_already_plugged=True in finish_migration
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Matt Riedemann committed Mar 6, 2015
1 parent cc8b8dc commit e4e1c6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nova/virt/libvirt/driver.py
Expand Up @@ -6351,6 +6351,11 @@ def finish_migration(self, context, migration, instance, disk_info,
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,
Expand Down

0 comments on commit e4e1c6a

Please sign in to comment.