Comment 9 for bug 1621076

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/372243
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a5c38cc861f052b89bc1ce182f68784c493c723e
Submitter: Jenkins
Branch: master

commit a5c38cc861f052b89bc1ce182f68784c493c723e
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.
    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.

    Change-Id: I8acae90c9d2111ed35f58f374f321d64f01ba563
    Closes-Bug: #1621076