This patch, builds on previous patches and enables
Live migration with SR-IOV indirect ports.
Prior to this change migration would have either:
- Failed with instance running on the source node.
- Failed with two VMs booted on both source and destination
nodes, VM state is set to migrating, duplicate MACs on
source and destination node and improper PCI resource claiming.
This scenario is observed in the case of macvtap port type and
neutron does not support multiple port binding API extension.
With very little, non user friendly information in the log.
Conductor Changes:
- Allow live migration only with VIF related PCI devices to allow
properly claiming PCI resources on the destination node.
With this change live migration with generic flavor based
PCI passthrough devices will not be supported due to libvirt and
qemu constraint.
- Add a check to allow live migration with VIF related PCI allocation
only when neutron supports multiple ports binding API extension
and compute nodes are up to date.
- update the migrating VIF with the correct profile when binding the
ports on the destination host, this will allow proper binding against
the destination host and ensure VIF will be plugged correctly by Nova.
Compute Changes:
- Create VIFMigrateData for all VIFs in
check_can_live_migrate_destination()
- For every VIF that contains a PCI device in its profile
claim a PCI device on the destination node using the matching
InstancePCIRequest of the instance being migrated.
- Update the relevant VIFMigrateData profile with the newly
claimed PCI device.
- Free PCI devices on source and allocate on destination upon
a successful migration or free claimed PCI devices on destination
upon failure.
NeutronV2 Changes:
- Don't update binding profile with PCI devices if migration type is
live-migration as the profile was already updated when an inactive
port binding was created during bind_ports_to_host() call
from conductor.
Note: This builds on multiple ports binding API.
Change-Id: I734cc01dce13f9e75a16639faf890ddb1661b7eb
Partial-Implement: blueprint libvirt-neutron-sriov-livemigration