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

os-net-config: race condition with this file/sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • os-net-config-14.2.1-17.1.20250425111017.61d7bd7.el9osttrunk
    • rhos-dfg-nfv
    • Yes
    • Hide
      .Fixes race condition that generated exception during SR-IOV Compute node reboot and minor updates

      Before this update, during SR-IOV Compute node reboot, a race condition occurred between `usr/bin/os-net-config-sriov` and `sysfs` (in physical function (PF) creation). As a result, the device was not available for the `usr/bin/os-net-config-sriov`, and an exception was generated.

      Now the race condition does not occur and the exception is not generated.
      Show
      .Fixes race condition that generated exception during SR-IOV Compute node reboot and minor updates Before this update, during SR-IOV Compute node reboot, a race condition occurred between `usr/bin/os-net-config-sriov` and `sysfs` (in physical function (PF) creation). As a result, the device was not available for the `usr/bin/os-net-config-sriov`, and an exception was generated. Now the race condition does not occur and the exception is not generated.
    • Bug Fix
    • Done
    • Low

      To Reproduce Steps to reproduce the behavior:

      In the process of verifying  OSPRH-14132 where os-net-config executes 2 times (one for first deployment and one for update), I have seen the following errors in logs

      2025-03-26 17:49:21.180 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-eno2
      2025-03-26 17:49:21.180 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/route-eno2
      2025-03-26 17:49:21.180 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-enp130s0f0
      2025-03-26 17:49:21.181 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-enp130s0f1
      2025-03-26 17:49:21.181 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-dpdkbond0
      2025-03-26 17:49:21.181 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-dpdk2
      2025-03-26 17:49:21.181 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-dpdk3
      2025-03-26 17:49:21.181 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-br-link0
      2025-03-26 17:49:21.182 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-br-dpdk0
      2025-03-26 17:49:21.182 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-br-dpdk1
      2025-03-26 17:49:21.182 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-bond_api
      2025-03-26 17:49:21.182 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-vlan120
      2025-03-26 17:49:21.182 INFO os_net_config.write_config Writing config /etc/sysconfig/network-scripts/ifcfg-vlan122
      2025-03-26 17:49:21.183 INFO os_net_config.execute running ifup on bridge: br-link0
      2025-03-26 17:49:24.596 INFO os_net_config.execute running ifup on bridge: br-dpdk0
      2025-03-26 17:49:26.830 INFO os_net_config.execute running ifup on bridge: br-dpdk1
      2025-03-26 17:49:29.058 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for eno1
      2025-03-26 17:49:29.058 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for eno2
      2025-03-26 17:49:29.058 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for enp130s0f0
      2025-03-26 17:49:29.058 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for enp130s0f1
      2025-03-26 17:49:29.058 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for dpdkbond0
      2025-03-26 17:49:29.058 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for dpdk2
      2025-03-26 17:49:29.059 DEBUG os_net_config.impl_ifcfg.apply Calling stop_dhclient_interfaces() for dpdk3
      2025-03-26 17:49:29.059 INFO os_net_config.execute running ifup on interface: eno1
      2025-03-26 17:49:29.308 INFO os_net_config.execute running ifup on interface: eno2
      2025-03-26 17:49:32.599 INFO os_net_config.execute running ifup on interface: enp130s0f0
      2025-03-26 17:49:33.325 INFO os_net_config.execute running ifup on interface: enp130s0f1
      2025-03-26 17:49:33.784 INFO os_net_config.execute running ifup on interface: dpdkbond0
      2025-03-26 17:49:36.215 INFO os_net_config.execute running ifup on interface: dpdk2
      2025-03-26 17:49:39.127 INFO os_net_config.execute running ifup on interface: dpdk3
      2025-03-26 17:49:41.378 INFO os_net_config.execute running ifup on interface: bond_api
      2025-03-26 17:49:43.656 INFO os_net_config.execute running ifup on interface: vlan120
      2025-03-26 17:49:48.760 INFO os_net_config.execute running ifup on interface: vlan122
      2025-03-27 01:35:20.975 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 181, in get_drivers_autoprobe
          with open(autoprobe_path, 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/bin/os-net-config-sriov", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 961, in main
          set_drivers_autoprobe(device_name, autoprobe)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 200, in set_drivers_autoprobe
          curr_autoprobe = get_drivers_autoprobe(ifname)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 185, in get_drivers_autoprobe
          raise SRIOVAutoprobeException(msg)
      os_net_config.sriov_config.SRIOVAutoprobeException: enp6s0f3: Unable to read sriov_drivers_autoprobe: [Errno 2] No such file or directory: '/sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe'
      NoneType: None
      2025-03-27 01:35:31.411 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 181, in get_drivers_autoprobe
          with open(autoprobe_path, 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/bin/os-net-config-sriov", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 961, in main
          set_drivers_autoprobe(device_name, autoprobe)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 200, in set_drivers_autoprobe
          curr_autoprobe = get_drivers_autoprobe(ifname)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 185, in get_drivers_autoprobe
          raise SRIOVAutoprobeException(msg)
      os_net_config.sriov_config.SRIOVAutoprobeException: enp4s0f1np1: Unable to read sriov_drivers_autoprobe: [Errno 2] No such file or directory: '/sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe'
      NoneType: None
      2025-03-27 02:05:12.917 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 181, in get_drivers_autoprobe
          with open(autoprobe_path, 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/bin/os-net-config-sriov", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 961, in main
          set_drivers_autoprobe(device_name, autoprobe)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 200, in set_drivers_autoprobe
          curr_autoprobe = get_drivers_autoprobe(ifname)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 185, in get_drivers_autoprobe
          raise SRIOVAutoprobeException(msg)
      os_net_config.sriov_config.SRIOVAutoprobeException: enp6s0f3: Unable to read sriov_drivers_autoprobe: [Errno 2] No such file or directory: '/sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe'
      NoneType: None
      2025-03-27 02:05:23.346 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 181, in get_drivers_autoprobe
          with open(autoprobe_path, 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/bin/os-net-config-sriov", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 961, in main
          set_drivers_autoprobe(device_name, autoprobe)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 200, in set_drivers_autoprobe
          curr_autoprobe = get_drivers_autoprobe(ifname)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 185, in get_drivers_autoprobe
          raise SRIOVAutoprobeException(msg)
      os_net_config.sriov_config.SRIOVAutoprobeException: enp4s0f1np1: Unable to read sriov_drivers_autoprobe: [Errno 2] No such file or directory: '/sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe'
      NoneType: None
      2025-03-27 02:13:03.307 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 181, in get_drivers_autoprobe
          with open(autoprobe_path, 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/bin/os-net-config-sriov", line 10, in <module>
          sys.exit(main())
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 961, in main
          set_drivers_autoprobe(device_name, autoprobe)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 200, in set_drivers_autoprobe
          curr_autoprobe = get_drivers_autoprobe(ifname)
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 185, in get_drivers_autoprobe
          raise SRIOVAutoprobeException(msg)
      os_net_config.sriov_config.SRIOVAutoprobeException: enp6s0f3: Unable to read sriov_drivers_autoprobe: [Errno 2] No such file or directory: '/sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe'
      NoneType: None
      2025-03-27 02:13:13.677 ERROR os_net_config.common.log_exceptions Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/os_net_config/sriov_config.py", line 181, in get_drivers_autoprobe
          with open(autoprobe_path, 'r') as f:
      FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe'  

      However, this files exists, so I think it is a race condition

      [root@compute-1 tripleo-admin]# ls /sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe
      /sys/class/net/enp4s0f1np1/device/sriov_drivers_autoprobe
      [root@compute-1 tripleo-admin]# ls /sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe
      /sys/class/net/enp6s0f3/device/sriov_drivers_autoprobe 

      Regression passed, so I think it is only a logging issue.

       

      Expected behavior

      • Errors should not be in os-net-config log

      Bug impact

      • Only errors in logs

       

              vcandapp@redhat.com Vijayalakshmi Candappa
              mnietoji@redhat.com Miguel Angel Nieto Jimenez
              rhos-dfg-nfv
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: