Comment 12 for bug 1621076

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

Reviewed: https://review.openstack.org/470347
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=059c5298e25361d5820842b10e5a1880fe7b18b3
Submitter: Jenkins
Branch: stable/newton

commit 059c5298e25361d5820842b10e5a1880fe7b18b3
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.

    Conflicts:
          nova/tests/unit/virt/libvirt/test_driver.py

    NOTE(mriedem): The conflict is due to change
    I5c461a8242c51994d12ce9c6774d5f956232f950 not being in Newton.

    Change-Id: I8acae90c9d2111ed35f58f374f321d64f01ba563
    Closes-Bug: #1621076
    (cherry picked from commit a5c38cc861f052b89bc1ce182f68784c493c723e)