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/470347 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=059c5298e25 361d5820842b10e 5a1880fe7b18b3
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 059c5298e25361d 5820842b10e5a18 80fe7b18b3
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
Conflicts:
nova/ tests/unit/ virt/libvirt/ test_driver. py
NOTE(mriedem): The conflict is due to change c51994d12ce9c67 74d5f956232f950 not being in Newton.
I5c461a8242
Change-Id: I8acae90c9d2111 ed35f58f374f321 d64f01ba563 89bc1ce182f6878 4c493c723e)
Closes-Bug: #1621076
(cherry picked from commit a5c38cc861f052b