Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2196661

Summary: os_net_config fails to run successfully (does not configure any interfaces) if one of the interfaces it tries to configure is a Mellanox interface used for DPDK
Product: Red Hat OpenStack Reporter: Jacob Ansari <jansari>
Component: os-net-configAssignee: RHOSP:NFV_Eng <rhosp-nfv-int>
Status: CLOSED CURRENTRELEASE QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.2 (Train)CC: bfournie, cfontain, hakhande, jslagle, jveiraca, ksundara, mburns, mnietoji, njohnston
Target Milestone: zstreamKeywords: Triaged, ZStream
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: os-net-config-11.5.1-2.20230728005156.8a89b94.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-12-10 15:08:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 6 Miguel Angel Nieto 2023-09-22 10:20:20 UTC
Hi, I am trying to verify this bug and I get an error, not sure if it is the same one that was reported here or a new one
I am trying to configure a dpdk bond and 1 interface is down (i disabled port in switch) and os-net-config it is failing to configure it.


[root@computehwoffload-r730-0 os-net-config]# rpm -qa | grep os-net
os-net-config-11.5.1-2.20230728005156.8a89b94.el8ost.noarch
[stack@undercloud-0 ~]$ cat core_puddle_version 
RHOS-16.2-RHEL-8-20230914.n.1[stack@undercloud-0 ~]$ 


mellanox interfaces are
      nic11: "enp4s0f0" 
      nic12: "enp4s0f1"

I start with this configuration, this is a bond with x710 interfaces

   {
      "members": [
        {
          "members": [
            {
              "mtu": 9000,
              "name": "nic11",
              "type": "interface",
            },
            {
              "mtu": 9000,
              "name": "nic12",
              "type": "interface",
            }
          ],
          "mtu": 9000,
          "name": "bond0",
          "type": "ovs_bond"
        }
      ],
      "name": "br-link1",
      "type": "ovs_bridge",
      "use_dhcp": false
    }

    Bridge br-link1
        fail_mode: standalone
        Port br-link1
            Interface br-link1
                type: internal
        Port patch-provnet-beaeef0b-1fe5-4ba5-a2c1-47f04e244c21-to-br-int
            Interface patch-provnet-beaeef0b-1fe5-4ba5-a2c1-47f04e244c21-to-br-int
                type: patch
                options: {peer=patch-br-int-to-provnet-beaeef0b-1fe5-4ba5-a2c1-47f04e244c21}
        Port bond0
            Interface enp6s0f1
            Interface enp6s0f0

I update nics to mellanox:
    {
      "members": [
        {
          "members": [
            {
              "mtu": 9000,
              "name": "nic11",
              "type": "interface",
            },
            {
              "mtu": 9000,
              "name": "nic12",
              "type": "interface",
            }
          ],
          "mtu": 9000,
          "name": "bond0",
          "type": "ovs_bond"
        }
      ],
      "name": "br-link1",
      "type": "ovs_bridge",
      "use_dhcp": false
    }

And disable one of the nics in the switch
[root@computehwoffload-r730-0 os-net-config]# ip a s enp4s0f0
31: enp4s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 9000 qdisc mq state DOWN group default qlen 1000
    link/ether ec:0d:9a:7d:7d:2a brd ff:ff:ff:ff:ff:ff
[root@computehwoffload-r730-0 os-net-config]# ip a s enp4s0f1
52: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    link/ether ec:0d:9a:7d:7d:2b brd ff:ff:ff:ff:ff:ff

and it failed when configuring
[root@computehwoffload-r730-0 os-net-config]# os-net-config -c config2.json 
[2023/09/22 09:57:55 AM] [WARNING] no mapping for interface enp8s0f0 because nic8 is mapped to enp6s0f1
[2023/09/22 09:57:55 AM] [WARNING] no mapping for interface enp8s0f1 because nic9 is mapped to enp6s0f2
[2023/09/22 09:58:00 AM] [ERROR] Failure(s) occurred when applying configuration
[2023/09/22 09:58:00 AM] [ERROR] stdout: , stderr: cannot make disabled member active
ovs-appctl: ovs-vswitchd: server returned an error

Traceback (most recent call last):
  File "/bin/os-net-config", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/os_net_config/cli.py", line 352, in main
    activate=not opts.no_activate)
  File "/usr/lib/python3.6/site-packages/os_net_config/impl_ifcfg.py", line 1909, in apply
    raise os_net_config.ConfigurationError(message)
os_net_config.ConfigurationError: Failure(s) occurred when applying configuration

If i enable the port
[root@computehwoffload-r730-0 os-net-config]# ip a s enp4s0f0
31: enp4s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq master ovs-system state UP group default qlen 1000
    link/ether ec:0d:9a:7d:7d:2a brd ff:ff:ff:ff:ff:ff
[root@computehwoffload-r730-0 os-net-config]# ip a s enp4s0f1
52: enp4s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq master ovs-system state UP group default qlen 1000
    link/ether ec:0d:9a:7d:7d:2b brd ff:ff:ff:ff:ff:ff

Then there is no error
[root@computehwoffload-r730-0 os-net-config]# os-net-config -c config2.json                                                                                                                                        
[2023/09/22 09:59:26 AM] [WARNING] no mapping for interface enp8s0f1 because nic10 is mapped to enp6s0f3                                                                                                           
[2023/09/22 09:59:26 AM] [WARNING] no mapping for interface enp8s0f0 because nic9 is mapped to enp6s0f2  

    Bridge br-link1
        fail_mode: standalone
        Port br-link1
            Interface br-link1
                type: internal
        Port patch-provnet-beaeef0b-1fe5-4ba5-a2c1-47f04e244c21-to-br-int
            Interface patch-provnet-beaeef0b-1fe5-4ba5-a2c1-47f04e244c21-to-br-int
                type: patch
                options: {peer=patch-br-int-to-provnet-beaeef0b-1fe5-4ba5-a2c1-47f04e244c21}
        Port bond0
            Interface enp4s0f0
            Interface enp4s0f1