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

Network role should remove MAC address matching from SysUtil.link_info_find()

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • rhel-system-roles
    • 0
    • QE ack, Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • Release Note Not Required
    • The RN is in RHEL-84362.
    • None

      What were you trying to do that didn't work?

      Given that a network connection specifies both an interface name and a MAC address for configuring a parent and VLAN connection, and the physical interface has the same permanent and current MAC address, when the configuration is applied multiple times and the role compares the user-specified MAC address against either the "perm-address" (permanent MAC) or "address" (current MAC) from sysfs, treating a match with only the current MAC matches even if the interface name differs from the user-specified one, then the error “no such interface exists” is raised.

      What is the impact of this issue to you?

      The `SysUtil.link_info_find()` function allows searching for links by MAC address, which introduces ambiguity in link matching and causes false alarms/errors in certain cases.

       

      Steps to reproduce

      1. Given a system has a physical ethernet interface `ens224`,  the physical ethernet interface has the same current mac and permanent mac. Then run the following `network_connections` multiple times, then the error (`no such interface exists`) will be raised: 

               

      network_connections:
        - name: 00-ens224-TRUNK
          state: up
          persistent_state: present
          autoconnect: true
          type: ethernet
          interface_name: ens224
          mac: 00:50:56:B0:81:92
          ip:
            dhcp4: false
            auto6: false
      
        - name: ens224.3732
          state: up
          persistent_state: present
          type: vlan
          parent: 00-ens224-TRUNK
          vlan:
            id: 3732
          autoconnect: true
          ip:
            auto_gateway: false
            ipv6_disabled: true
            gateway4: 10.10.0.1
            address: 10.10.0.6/24
            dhcp4: false
            auto6: false 

       

      Expected results

      The network role runs successfully without raising errors.

      Actual results

      The error (`no such interface exists`) will be raised. 

              rmeggins@redhat.com Richard Megginson
              liangwen12year Wen Liang
              Richard Megginson Richard Megginson
              David Jez David Jez
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: