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

[Epic]: Network role should refine MAC validation using interface name [rhel-10]

Linking RHIVOS CVEs to...Migration: Automation ...XMLWordPrintable

    • [Epic]: Network role should refine MAC validation using interface name [rhel-10]
    • Low
    • Red Hat Enterprise Linux
    • 25% To Do, 25% In Progress, 50% Done
    • rhel-sst-system-roles
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Dev ack

      This is a clone of issue RHEL-84362 to use for version rhel-10.1

      Original description:

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

      When a user provides both an interface name and a MAC address, the current validation process retrieves sysfs link info separately using the interface name and the MAC address, then compares the results. If the information doesn't match, an error is raised. However, this approach may trigger false alarms because retrieving the link info by MAC might return the link info that only matches the current MAC instead of the permanent MAC. Since the interface name is unique within the kernel, a more robust validation method is to fetch the MAC address using the interface name and then compare it directly with the user-provided MAC address.

      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
              rmeggins@redhat.com Richard Megginson
              Richard Megginson Richard Megginson
              David Jez David Jez
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: