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

Bug #1878042 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Rodolfo Alonso
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

NOTE: pyroute2 commit where some little support for SRIOV is added: https://github.com/svinota/pyroute2/commit/1318e3e146e1243a62202f4f1b64db6da65b3034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/727811

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/727829

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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 <email address hidden>
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/727829
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=764ff2a70a53100a301a07832c4d9a3fed3fd0fb
Submitter: Zuul
Branch: stable/train

commit 764ff2a70a53100a301a07832c4d9a3fed3fd0fb
Author: Rodolfo Alonso Hernandez <email address hidden>
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.

    Conflicts:
        neutron/tests/unit/agent/linux/test_ip_link_support.py

    Change-Id: I680da4f64bd114f1caecaaeedbf8a4b1915a0849
    Closes-Bug: #1878042
    (cherry picked from commit c5d8fd6329e405d1d584f4fedd7d0ede7da278da)
    (cherry picked from commit 5df65489dc64fc7ec305a3c711bbb6c41ffe488b)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/727811
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2b2abfc76a4993f25624e10a1403cfabfa53abd9
Submitter: Zuul
Branch: stable/ussuri

commit 2b2abfc76a4993f25624e10a1403cfabfa53abd9
Author: Rodolfo Alonso Hernandez <email address hidden>
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.

    Conflicts:
        neutron/tests/unit/agent/linux/test_ip_link_support.py

    Change-Id: I680da4f64bd114f1caecaaeedbf8a4b1915a0849
    Closes-Bug: #1878042
    (cherry picked from commit c5d8fd6329e405d1d584f4fedd7d0ede7da278da)

tags: added: in-stable-ussuri
tags: added: neutron-proactive-backport-potential
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.