Mellanox cards are not triggering the DPDK mapping file creation

Bug #1862298 reported by David Vallee Delisle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Undecided
David Vallee Delisle

Bug Description

Description of problem:
Since os-net-config skips driverctl run for nics that are already bound, the mellanox cards are not added in /var/lib/os-net-config/dpdk_mapping.yaml .

This leads to getting wrong pci address in ifcfg files as get_stored_pci_address
returns 'None'.

Version-Release number of selected component (if applicable):
RHOS13z9
os-net-config-8.5.1-1.el7ost.noarch

How reproducible:
Always

Actual results:
$ grep OVS_EXTRA etc/sysconfig/network-scripts/ifcfg-dpdk[01]
etc/sysconfig/network-scripts/ifcfg-dpdk0:OVS_EXTRA="set Interface $DEVICE options:dpdk-devargs=None -- set Interface $DEVICE mtu_request=$MTU -- set Interface $DEVICE options:n_rxq=$RX_QUEUE"
etc/sysconfig/network-scripts/ifcfg-dpdk1:OVS_EXTRA="set Interface $DEVICE options:dpdk-devargs=None -- set Interface $DEVICE mtu_request=$MTU -- set Interface $DEVICE options:n_rxq=$RX_QUEUE"

sos_commands/openvswitch/ovs-vsctl_-t_5_show
    Bridge "br-data1"
        Controller "tcp:127.0.0.1:6633"
            is_connected: true
        fail_mode: secure
        Port "phy-br-data1"
            Interface "phy-br-data1"
                type: patch
                options: {peer="int-br-data1"}
        Port "br-data1"
            Interface "br-data1"
                type: internal
        Port "dpdk1"
            Interface "dpdk1"
                type: dpdk
                options: {dpdk-devargs=None, n_rxq="1"}
                error: "Error attaching device 'None' to DPDK"
    Bridge "br-data2"

[1] In the full os-net-config output, we clearly see it's skipped: Driver (mlx5_core) is already bound to the device

Expected results:

etc/sysconfig/network-scripts/ifcfg-dpdk0:OVS_EXTRA="set Interface $DEVICE options:dpdk-devargs=0000:37:00.0 -- set Interface $DEVICE mtu_request=$MTU -- set Interface $DEVICE options:n_rxq=$RX_QUEUE"
etc/sysconfig/network-scripts/ifcfg-dpdk1:OVS_EXTRA="set Interface $DEVICE options:dpdk-devargs=0000:37:00.1 -- set Interface $DEVICE mtu_request=$MTU -- set Interface $DEVICE options:n_rxq=$RX_QUEUE"

https://bugzilla.redhat.com/show_bug.cgi?id=1781540
https://access.redhat.com/solutions/4647381

[1]
~~~
os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes
[2020/02/06 10:38:26 PM] [INFO] Using config file at: /etc/os-net-config/config.json
[2020/02/06 10:38:26 PM] [INFO] Ifcfg net config provider created.
[2020/02/06 10:38:26 PM] [INFO] Not using any mapping file.
[2020/02/06 10:38:27 PM] [INFO] Finding active nics
[2020/02/06 10:38:27 PM] [INFO] p1p2 is an active nic
[2020/02/06 10:38:27 PM] [INFO] p1p1 is an active nic
[2020/02/06 10:38:27 PM] [INFO] p4p1 is an active nic
[2020/02/06 10:38:27 PM] [INFO] p8p1 is an active nic
[2020/02/06 10:38:27 PM] [INFO] lo is not an active nic
[2020/02/06 10:38:27 PM] [INFO] em3 is an embedded active nic
[2020/02/06 10:38:27 PM] [INFO] em2 is an embedded active nic
[2020/02/06 10:38:27 PM] [INFO] em1 is an embedded active nic
[2020/02/06 10:38:27 PM] [INFO] em4 is not an active nic
[2020/02/06 10:38:27 PM] [INFO] No DPDK mapping available in path (/var/lib/os-net-config/dpdk_mapping.yaml)
[2020/02/06 10:38:27 PM] [INFO] Active nics are ['em1', 'em2', 'em3', 'p1p1', 'p1p2', 'p4p1', 'p8p1']
[2020/02/06 10:38:27 PM] [INFO] nic6 mapped to: p4p1
[2020/02/06 10:38:27 PM] [INFO] nic4 mapped to: p1p1
[2020/02/06 10:38:27 PM] [INFO] nic7 mapped to: p8p1
[2020/02/06 10:38:27 PM] [INFO] nic5 mapped to: p1p2
[2020/02/06 10:38:27 PM] [INFO] nic1 mapped to: em1
[2020/02/06 10:38:27 PM] [INFO] nic3 mapped to: em3
[2020/02/06 10:38:27 PM] [INFO] nic2 mapped to: em2
[2020/02/06 10:38:27 PM] [INFO] adding interface: em1
[2020/02/06 10:38:27 PM] [INFO] adding custom route for interface: em1
[2020/02/06 10:38:27 PM] [INFO] adding interface: em2
[2020/02/06 10:38:27 PM] [INFO] adding interface: em3
[2020/02/06 10:38:27 PM] [INFO] adding interface: em4
[2020/02/06 10:38:27 PM] [INFO] adding linux bond: bond_api
[2020/02/06 10:38:27 PM] [INFO] adding interface: p1p1
[2020/02/06 10:38:27 PM] [INFO] adding interface: p1p2
[2020/02/06 10:38:27 PM] [INFO] adding vlan: vlan1220
[2020/02/06 10:38:27 PM] [INFO] adding vlan: vlan1260
[2020/02/06 10:38:27 PM] [INFO] adding ovs user bridge: br-tenant
[2020/02/06 10:38:27 PM] [INFO] adding ovs dpdk bond: dpdkbond0
[2020/02/06 10:38:27 PM] [INFO] Driver (mlx5_core) is already bound to the device (p4p1)
[2020/02/06 10:38:27 PM] [INFO] Driver (mlx5_core) is already bound to the device (p8p1)
[2020/02/06 10:38:27 PM] [INFO] applying network configs...
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: vlan1220
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: vlan1260
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: p1p1
[2020/02/06 10:38:27 PM] [INFO] interface p1p1 is up, trying with ip command
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: p1p2
[2020/02/06 10:38:27 PM] [INFO] interface p1p2 is up, trying with ip command
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: em4
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: em1
[2020/02/06 10:38:27 PM] [INFO] interface em1 is up, trying with ip command
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: em3
[2020/02/06 10:38:27 PM] [INFO] interface em3 is up, trying with ip command
[2020/02/06 10:38:27 PM] [INFO] running ifdown on interface: em2
[2020/02/06 10:38:28 PM] [INFO] interface em2 is up, trying with ip command
[2020/02/06 10:38:28 PM] [INFO] running ifdown on interface: dpdkbond0
[2020/02/06 10:38:28 PM] [INFO] running ifdown on interface: bond_api
[2020/02/06 10:38:28 PM] [INFO] running ifdown on bridge: br-tenant
[2020/02/06 10:38:28 PM] [INFO] Restart openvswitch
~~~

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

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

Changed in os-net-config:
assignee: nobody → David Vallee Delisle (valleedelisle)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.opendev.org/706429
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=11d9a23600e43de0071f05e716ec6f7e1ee80670
Submitter: Zuul
Branch: master

commit 11d9a23600e43de0071f05e716ec6f7e1ee80670
Author: David Vallee Delisle <email address hidden>
Date: Thu Feb 6 23:42:50 2020 -0500

    We need to use the MAC instead of PCI Address for Mellanox cards

    Since Mellanox cards are already bound, they are not added
    to the dpdk mapping file. The set devargs command is never run.

    This patch ensures that get_dpdk_devargs returns the devargs,
    even on newer Mellanox interfaces.

    Change-Id: I6f4c3716c7ee74d7bd2c48e598e5c6de4332d726
    Closes-Bug: 1862298

Changed in os-net-config:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/train)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/train)

Reviewed: https://review.opendev.org/710872
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=74d32121f6b807ef646f6dc58ad8693233503f1e
Submitter: Zuul
Branch: stable/train

commit 74d32121f6b807ef646f6dc58ad8693233503f1e
Author: David Vallee Delisle <email address hidden>
Date: Thu Feb 6 23:42:50 2020 -0500

    We need to use the MAC instead of PCI Address for Mellanox cards

    Since Mellanox cards are already bound, they are not added
    to the dpdk mapping file. The set devargs command is never run.

    This patch ensures that get_dpdk_devargs returns the devargs,
    even on newer Mellanox interfaces.

    Change-Id: I6f4c3716c7ee74d7bd2c48e598e5c6de4332d726
    Closes-Bug: 1862298
    (cherry picked from commit 11d9a23600e43de0071f05e716ec6f7e1ee80670)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/711223

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/stein)

Reviewed: https://review.opendev.org/711223
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=de626b2609f531727c336513faf2fa27ea377e5b
Submitter: Zuul
Branch: stable/stein

commit de626b2609f531727c336513faf2fa27ea377e5b
Author: David Vallee Delisle <email address hidden>
Date: Thu Feb 6 23:42:50 2020 -0500

    We need to use the MAC instead of PCI Address for Mellanox cards

    Since Mellanox cards are already bound, they are not added
    to the dpdk mapping file. The set devargs command is never run.

    This patch ensures that get_dpdk_devargs returns the devargs,
    even on newer Mellanox interfaces.

    Change-Id: I6f4c3716c7ee74d7bd2c48e598e5c6de4332d726
    Closes-Bug: 1862298
    (cherry picked from commit 11d9a23600e43de0071f05e716ec6f7e1ee80670)
    (cherry picked from commit 74d32121f6b807ef646f6dc58ad8693233503f1e)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/713007

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/rocky)

Reviewed: https://review.opendev.org/713007
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=271d9ab0c69787979a09da8bc8c042096a8fc6dc
Submitter: Zuul
Branch: stable/rocky

commit 271d9ab0c69787979a09da8bc8c042096a8fc6dc
Author: David Vallee Delisle <email address hidden>
Date: Thu Feb 6 23:42:50 2020 -0500

    We need to use the MAC instead of PCI Address for Mellanox cards

    Since Mellanox cards are already bound, they are not added
    to the dpdk mapping file. The set devargs command is never run.

    This patch ensures that get_dpdk_devargs returns the devargs,
    even on newer Mellanox interfaces.

    Change-Id: I6f4c3716c7ee74d7bd2c48e598e5c6de4332d726
    Closes-Bug: 1862298
    (cherry picked from commit 11d9a23600e43de0071f05e716ec6f7e1ee80670)
    (cherry picked from commit 74d32121f6b807ef646f6dc58ad8693233503f1e)
    (cherry picked from commit de626b2609f531727c336513faf2fa27ea377e5b)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/713198

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/queens)

Reviewed: https://review.opendev.org/713198
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=cad5a734efbd5e7531112c427ebb6550db0cf290
Submitter: Zuul
Branch: stable/queens

commit cad5a734efbd5e7531112c427ebb6550db0cf290
Author: David Vallee Delisle <email address hidden>
Date: Thu Feb 6 23:42:50 2020 -0500

    We need to use the MAC instead of PCI Address for Mellanox cards

    Since Mellanox cards are already bound, they are not added
    to the dpdk mapping file. The set devargs command is never run.

    This patch ensures that get_dpdk_devargs returns the devargs,
    even on newer Mellanox interfaces.

    Change-Id: I6f4c3716c7ee74d7bd2c48e598e5c6de4332d726
    Closes-Bug: 1862298
    (cherry picked from commit 11d9a23600e43de0071f05e716ec6f7e1ee80670)
    (cherry picked from commit 74d32121f6b807ef646f6dc58ad8693233503f1e)
    (cherry picked from commit de626b2609f531727c336513faf2fa27ea377e5b)
    (cherry picked from commit 271d9ab0c69787979a09da8bc8c042096a8fc6dc)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 12.2.0

This issue was fixed in the openstack/os-net-config 12.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 11.4.0

This issue was fixed in the openstack/os-net-config 11.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config rocky-eol

This issue was fixed in the openstack/os-net-config rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config queens-eol

This issue was fixed in the openstack/os-net-config queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config stein-eol

This issue was fixed in the openstack/os-net-config stein-eol release.

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.