← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1878042] Re: SRIOV agent does not parse correctly "ip link show <dev>"

 

Reviewed:  https://review.opendev.org/726918
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c5d8fd6329e405d1d584f4fedd7d0ede7da278da
Submitter: Zuul
Branch:    master

commit c5d8fd6329e405d1d584f4fedd7d0ede7da278da
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Mon May 11 17:59:48 2020 +0000

    Use pyroute2 for SRIOV VF commands
    
    Recent changes in some versions of iproute2 CLI output (v4.18),
    have invalidated the regular expression used to parse the
    "ip link" output.
    
    To solve this problem and avoid future ones, pyroute2 is used to
    retrieve the virtual functions information and set the VF attributes
    (spoofcheck, min_tx_rate, max_tx_rate and link_state).
    
    pyroute2 extended the "ip link" support to retrieve this information,
    adding "ext_mask=1" in the get command. If no virtual functions are
    present in this particular network interface, the added method,
    "get_link_vfs",  will return an empty list.
    
    The set commands can return a "InterfaceOperationNotSupported" in
    case the operation is not supported. For min_tx_rate, if the driver
    does not support to set a minimum bandwidth, an "InvalidArgument"
    (from a pyroute2.NetlinkError(22)) exception will be raised.
    
    Change-Id: I680da4f64bd114f1caecaaeedbf8a4b1915a0849
    Closes-Bug: #1878042


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1878042

Title:
  SRIOV agent does not parse correctly "ip link show <dev>"

Status in neutron:
  Fix Released

Bug description:
  In Red Hat 8.2, iproute2-ss190924, the output for "ip link show <dev>"
  is http://paste.openstack.org/show/793392/

  The regex [1] used does not parse the VF information line and can't
  extract the MAC address and the state.

  [1]https://github.com/openstack/neutron/blob/2ac52607c266e593700be0784ebadc77789070ff/neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py#L38-L44
  [2]https://github.com/openstack/neutron/blob/2ac52607c266e593700be0784ebadc77789070ff/neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py#L178

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1878042/+subscriptions


References