Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5717

99-nm-run.sh prints misleading error message "cat: /sys/class/net/bonding_masters/ifindex: Not a directory"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-8.7.0
    • dracut
    • None
    • Moderate
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      When booting with a bond, 99-nm-run.sh prints the following error message, which brings confusion to customers having network boot issues:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      cat: /sys/class/net/bonding_masters/ifindex: Not a directory
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      This is due to not having Upstream commit d9c3c77437d91d7d66369a3ef701ffc5e501346d, useful to skip non-directory inodes, such as "bonding_masters":
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
      index 8d6942c9..7d8d61fa 100755
      — a/modules.d/35network-manager/nm-run.sh
      +++ b/modules.d/35network-manager/nm-run.sh
      @@ -60,6 +60,7 @@ dhcpopts_create() {
      }

      for _i in /sys/class/net/*; do
      + [ -d "$_i" ] || continue
      state="/run/NetworkManager/devices/$(cat "$_i"/ifindex)"
      grep -q '^connection-uuid=' "$state" 2> /dev/null || continue
      ifname="${_i##*/}"
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Version-Release number of selected component (if applicable):

      up to dracut-049-223.git20230119 included

      How reproducible:

      Always

      Steps to Reproduce:
      1. Configure a bond and boot through the network

      Actual results:

      Error message

      Expected results:

      No error message

      Additional info:

      Such misleading benign error message can make support specialists search in the wrong direction.

              dracut-maint dracut maint mailing list
              rhn-support-rmetrich Renaud Métrich
              dracut maint mailing list dracut maint mailing list
              qe-baseos-daemons qe-baseos-daemons
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: