pci.py:is_sriov should only enable VFs on interfaces listed in sriov-device-mappings

Bug #1818975 reported by Alvaro Uria
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Neutron Open vSwitch Charm
Fix Released
Wishlist
Sahid Orentino

Bug Description

In hooks/pci.py, "update_interface_info" uses "get_sysnet_interfaces_and_macs", which in turn uses "is_sriov" to enable VFs on all SR-IOV enabled interfaces.

When sriov-numvfs is in auto mode (default), all SR-IOV enabled interfaces will get the totalvfs number set.

It would be desirable that only the devices configured in sriov-device-mappings are discovered, and leave the rest unconfigured. I understand sriov-numvfs gives the option to select the interfaces, but I find it repetitive if those interfaces have already been configured in a previous configuration parameter.

On the other hand, we have run into an issue where a customer has multiple compute nodes with SR-IOV interfaces connected into different chassis slots. Some compute nodes have enp216s0f1 and others enp131s0f1. We came up with a interface name regexp on the sriov-device-mappings to work around it. See [3].

References:
1. https://github.com/openstack/charm-neutron-openvswitch/blob/07b6dbad86b2cc35408f1679d05d0aeae11e721f/hooks/pci.py#L101,L111
2. https://github.com/openstack/charm-neutron-openvswitch/blob/07b6dbad86b2cc35408f1679d05d0aeae11e721f/config.yaml#L184,L218
3. https://github.com/CanonicalBootStack/charm-neutron-openvswitch/commit/c06b38314f9870d29e6aa8c781db2be7039193bd

Revision history for this message
Alvaro Uria (aluria) wrote :

My bad, "sriov-numvfs" expects a number. So *all* SR-IOV enabled interfaces will get that number (or the maximum number available). Could this be made configurable? Thank you.

David Ames (thedac)
Changed in charm-neutron-openvswitch:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → 19.07
Changed in charm-neutron-openvswitch:
assignee: nobody → Sahid Orentino (sahid-ferdjaoui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-neutron-openvswitch (master)

Fix proposed to branch: master
Review: https://review.opendev.org/660386

Changed in charm-neutron-openvswitch:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-neutron-openvswitch (master)

Reviewed: https://review.opendev.org/660386
Committed: https://git.openstack.org/cgit/openstack/charm-neutron-openvswitch/commit/?id=380adb7271c8de67d343f43b9226efa77eb5adc2
Submitter: Zuul
Branch: master

commit 380adb7271c8de67d343f43b9226efa77eb5adc2
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Tue May 21 15:21:30 2019 +0200

    pci: use sriov-device-mappings when configure sriov devices

    When 'sriov-numvfs' is configured in 'auto', only the devies set in
    'sriov-device-mappings' are discovered and automatically configured.

    Change-Id: I1be61a19639d366d787fb92815c3a8a5c302fbda
    Closes-Bug: #1818975
    Signed-off-by: Sahid Orentino Ferdjaoui <email address hidden>

Changed in charm-neutron-openvswitch:
status: In Progress → Fix Committed
David Ames (thedac)
Changed in charm-neutron-openvswitch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.