Support detach interface with same MAC from instance
When detach_interface nova uses <interface> XML generated
from scatch, which is missing the PCI device information that
libvirt would use to uniquely identify devices.
In case instance has mutiple interfaces with same MAC address.
Libvirt will failed with below error message: libvirtError: operation failed: multiple devices matching
mac address fa:16:3e:60:46:1f found
This patch fixes this problem by provide a new function
get_interface_by_cfg, this function uses cfg generated by
nova.virt.libvirt.vif.get_config as parameter,
return a LibvirtConfigGuestInterface object.
Also added function format_dom for
LibvirtConfigGuestDeviceAddressPCI, which will be used to
generate pci address for LibvirtConfigGuestInterface.
Reviewed: https:/ /review. openstack. org/372243 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=a5c38cc861f 052b89bc1ce182f 68784c493c723e
Committed: https:/
Submitter: Jenkins
Branch: master
commit a5c38cc861f052b 89bc1ce182f6878 4c493c723e
Author: Leehom Li (feli5) <email address hidden>
Date: Mon Sep 19 13:43:46 2016 +0800
Support detach interface with same MAC from instance
When detach_interface nova uses <interface> XML generated
from scatch, which is missing the PCI device information that
libvirt would use to uniquely identify devices.
In case instance has mutiple interfaces with same MAC address.
libvirtError: operation failed: multiple devices matching
Libvirt will failed with below error message:
mac address fa:16:3e:60:46:1f found
This patch fixes this problem by provide a new function interface_ by_cfg, this function uses cfg generated by virt.libvirt. vif.get_ config as parameter, estInterface object.
get_
nova.
return a LibvirtConfigGu
Also added function format_dom for igGuestDeviceAd dressPCI, which will be used to estInterface.
LibvirtConf
generate pci address for LibvirtConfigGu
Change-Id: I8acae90c9d2111 ed35f58f374f321 d64f01ba563
Closes-Bug: #1621076