nova compute overwrite binding-profile when updating port direct port

Bug #1719327 reported by Moshe Levi on 2017-09-25
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
edan david

Bug Description

in case a user create direct port with binding-profile such as:
 --binding-profile '{"capabilities": ["switchdev"]}'. nova-compute will
overwrite that info with the pci_vendor_info pci_slot which are used for the SR-IOV mechanism driver and agent, and on delete it will clear the binding:profile.

This change is important to OVS hardware-offload, because we distinguish between legacy SR-IOV to switchdev SR-IOV with the {"capabilities": ["switchdev"]} in the port profile. And with this info we know what mechanism driver will bind the direct port. {"capabilities": ["switchdev"]} - will bound by the OVS and all the others will be bound by SR-IOV mechanism driver

Changed in nova:
assignee: nobody → Moshe Levi (moshele)
status: New → In Progress
Changed in nova:
assignee: Moshe Levi (moshele) → edan david (edand)
Changed in nova:
assignee: edan david (edand) → Moshe Levi (moshele)
Changed in nova:
assignee: Moshe Levi (moshele) → edan david (edand)
Matt Riedemann (mriedem) wrote :

Would we need to backport this to Pike?

tags: added: neutron
Matt Riedemann (mriedem) wrote :

Probably not needed for Pike, as I guess this is needed for blueprint enable-sriov-nic-features which didn't complete in Pike.

Moshe Levi (moshele) wrote :

yes, this is because of a change I added to neutron in pike.

https://review.openstack.org/#/c/504427/. This was need so that a user can request if want to use the SR-IOV mechanism driver (legacy SR-iOV) or OVS Hardware Offload (switchdev SR-IOV) without is it will be depended on the other of the mechanism drivers in the neutron config to do the binding and that break tripleo upgrade.

The the sriov-nic-features is important from scheduling perspective that nova will know to select the hypervisor with the right SR-IVO capabilities (Legacy or switchdev).

So this is worth backporting to Pike :)

Reviewed: https://review.openstack.org/505613
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ee7858ffcaf3f874feb0ea0c68871f2c93254fdd
Submitter: Zuul
Branch: master

commit ee7858ffcaf3f874feb0ea0c68871f2c93254fdd
Author: Moshe Levi <email address hidden>
Date: Wed Sep 20 15:24:29 2017 +0300

    Don't overwrite binding-profile

    Currently when providing existing direct port, nova-compute
    will overwrite the binding-profile information with pci_vendor_info
    and pci_slot. The binding-profile will be used to request
    NIC capabilities for SR-IOV ports [1]. This also allows to distinguish
    which neutron mechanism driver will bind the port [2].

    This patch updates the behaviour that on update port it will update,
    rather than overwrite, the binding-profile information with
    pci_vendor_info and pci_slot. And on unbind port it will remove
    only the pci_vendor_info and pci_slot from the port binding-profile
    rather than unsetting the entire field.

    [1] https://review.openstack.org/#/c/435954/
    [2] https://review.openstack.org/#/c/499203/

    Closes-Bug: #1719327

    Change-Id: I80106707a037d567d0f690570f2cf9cfcd30d594

Changed in nova:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/519066
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7b2f7a1f96787a490d56289c55b8ad7cb5ac030e
Submitter: Zuul
Branch: master

commit 7b2f7a1f96787a490d56289c55b8ad7cb5ac030e
Author: Moshe Levi <email address hidden>
Date: Sun Nov 12 08:55:15 2017 +0200

    Don't overwrite binding-profile

    Currently when providing existing direct port, nova-compute
    will overwrite the binding-profile information with pci_vendor_info
    and pci_slot. The binding-profile will be used to request
    NIC capabilities for SR-IOV ports [1]. This also allows to distinguish
    which neutron mechanism driver will bind the port [2].

    This patch updates the behaviour that on update port it will update,
    rather than overwrite, the binding-profile information with
    pci_vendor_info and pci_slot. And on unbind port it will remove
    only the pci_vendor_info and pci_slot from the port binding-profile
    rather than unsetting the entire field.

    [1] https://review.openstack.org/#/c/435954/
    [2] https://review.openstack.org/#/c/499203/

    Closes-Bug: #1719327

    Change-Id: Id847949b4761d51a14e5c2f39552f60a47889aa9

This issue was fixed in the openstack/nova 17.0.0.0b2 development milestone.

Change abandoned by Moshe Levi (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/563501

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers