Comment 21 for bug 1942329

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/864933
Committed: https://opendev.org/openstack/nova/commit/a340630c5c78e5f5856004d0a551dfa93df7f28d
Submitter: "Zuul (22348)"
Branch: stable/xena

commit a340630c5c78e5f5856004d0a551dfa93df7f28d
Author: Balazs Gibizer <email address hidden>
Date: Tue Feb 15 14:38:41 2022 +0100

    Record SRIOV PF MAC in the binding profile

    Today Nova updates the mac_address of a direct-physical port to reflect
    the MAC address of the physical device the port is bound to. But this
    can only be done before the port is bound. However during migration Nova
    does not update the MAC when the port is bound to a different physical
    device on the destination host.

    This patch extends the libvirt virt driver to provide the MAC address of
    the PF in the pci_info returned to the resource tracker. This
    information will be then persisted in the extra_info field of the
    PciDevice object.

    Then the port update logic during migration, resize, live
    migration, evacuation and unshelve is also extended to record the MAC of
    physical device in the port binding profile according to the device on
    the destination host.

    The related neutron change Ib0638f5db69cb92daf6932890cb89e83cf84f295
    uses this info from the binding profile to update the mac_address field
    of the port when the binding is activated.

    Closes-Bug: #1942329

    Conflicts:
        nova/network/neutron.py
        nova/objects/pci_device.py
        nova/tests/fixtures/libvirt.py
        nova/tests/unit/network/test_neutron.py
        nova/tests/unit/virt/libvirt/test_host.py
        nova/virt/fake.py
        nova/virt/libvirt/host.py

    Most of the conlficts are due to the lack of the vpd feature
    and I83a128a260acdd8bf78fede566af6881b8b82a9c

    the addtional unit tests in test_neutron and test_compute_mgr
    are form the vpd feature but have been modified to drop assertions
    related to the vpd feature while keeping the assertions related
    to SRIOV PF MAC adress binding.

    Change-Id: Iad5e70b43a65c076134e1874cb8e75d1ba214fde
    (cherry picked from commit cd03bbc1c33e33872594cf002f0e7011ab8ea047)
    (cherry picked from commit 813377077bd0173bdf128823e46b5df7c0a575b9)