Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-17306

[ifcfg] cleanup of linux bond with interface as member results in interface going down

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhos-18.0.11
    • None
    • os-net-config
    • None
    • 0
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • os-net-config-18.0.1-18.0.20250721204711.22b9a65.el9ost
    • os-net-config-18.0.1-18.0.20250721204711.22b9a65.el9ost
    • rhos-dfg-nfv
    • None
    • NFV Automation 012
    • 1
    • Important

      In ifcfg mode when cleanup of linux bond with interface as member results in interface going down as below if you see eno1

      [root@rhos-nfv-12 ~]# ip a
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host 
             valid_lft forever preferred_lft forever
      2: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
          link/ether 2c:ea:7f:f7:36:aa brd ff:ff:ff:ff:ff:ff
          altname enp193s0f0
      3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
          link/ether 2c:ea:7f:f7:36:ab brd ff:ff:ff:ff:ff:ff
          altname enp193s0f1
          inet 10.8.2.187/19 brd 10.8.31.255 scope global eno2
             valid_lft forever preferred_lft forever
          inet6 2620:52:0:800:2eea:7fff:fef7:36ab/64 scope global dynamic mngtmpaddr 
             valid_lft 2591995sec preferred_lft 604795sec
          inet6 fe80::2eea:7fff:fef7:36ab/64 scope link 
             valid_lft forever preferred_lft forever

      Ideally we should be having nic mapping as below. Before the cleanup was run the mapping is as below
      [root@rhos-nfv-12 ~]# os-net-config -i

      {"nic2": "eno2", "nic1": "eno1", "nic4": "enp196s0f1np1", "nic3": "enp196s0f0np0"}

      [root@rhos-nfv-12 ~]

      But once the cleanup is done because the interface going down the mapping gets changed as below.
      [root@rhos-nfv-12 ~]# os-net-config -i

      {"nic1": "eno2", "nic3": "enp196s0f1np1", "nic2": "enp196s0f0np0"}

      [root@rhos-nfv-12 ~]

      And hence the subsequent configuration using nic4 fails as now the mapping is totally different and errors seen as below

      2025-06-05 10:20:51.005 INFO os_net_config.common.get_pci_address nic4: Unable to get pci address from sysfs. Err: [Errno 2] No such file or directory: '/sys/class/net/nic4/device'
      2025-06-05 10:20:51.005 INFO os_net_config.common.get_dpdk_pci_address nic4: Fetch pci address from dpdk map
      2025-06-05 10:20:51.005 INFO os_net_config.common.get_pci_address nic4: pci address is None
      2025-06-05 10:20:51.012 ERROR os_net_config.common.interface_mac Unable to read mac address: nic4
      2025-06-05 10:20:51.012 ERROR os_net_config.main **Failed to configure with ifcfg provider**
      [Errno 2] No such file or directory: '/sys/class/net/nic4/address'
      2025-06-05 10:20:51.013 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/bin/os-net-config", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/cli.py", line 363, in main
          obj = objects.object_from_json(iface_json)
        File "/usr/lib/python3.9/site-packages/os_net_config/objects.py", line 96, in object_from_json
          return SriovPF.from_json(json)
        File "/usr/lib/python3.9/site-packages/os_net_config/objects.py", line 1794, in from_json
          return SriovPF(name, numvfs, *opts,
        File "/usr/lib/python3.9/site-packages/os_net_config/objects.py", line 1725, in _init_
          self.mac_address = common.interface_mac(self.name)
        File "/usr/lib/python3.9/site-packages/os_net_config/common.py", line 305, in interface_mac
          with open(get_dev_path(name, '_address'), 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/nic4/address'
      NoneType: None
      Traceback (most recent call last):
        File "/usr/bin/os-net-config", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/cli.py", line 363, in main
          obj = objects.object_from_json(iface_json)
        File "/usr/lib/python3.9/site-packages/os_net_config/objects.py", line 96, in object_from_json
          return SriovPF.from_json(json)
        File "/usr/lib/python3.9/site-packages/os_net_config/objects.py", line 1794, in from_json
          return SriovPF(name, numvfs, *opts,
        File "/usr/lib/python3.9/site-packages/os_net_config/objects.py", line 1725, in _init_
          self.mac_address = common.interface_mac(self.name)
        File "/usr/lib/python3.9/site-packages/os_net_config/common.py", line 305, in interface_mac
          with open(get_dev_path(name, '_address'), 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/nic4/address'
      [root@rhos-nfv-12 ~]

      In comparison to nmstate mode. This issue is not seen there. When the linux bond having an interface is removed the linux bond / vlan inteface is removed. But the interface(eno1/nic1) is not brought down and hence there is no issue in subsequent runs.

              rdiazcam@redhat.com Ricardo Diaz Campos
              arn1@redhat.com Abhiram R N
              rhos-dfg-nfv
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: