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

nmstate persist-nic-names uses bond mac for subordinate instead of permanent HW addr

    • sst_network_management
    • ssg_networking
    • 24
    • 1
    • False
    • Hide

      None

      Show
      None
    • No
    • NMT - RHEL 8.10/9.4 DTM 06
    • Hide

      Given a system administrator has configured a bond using nmstatectl with two NICs, and the yaml configuration for NMStateConfig specifies distinct MAC addresses for each NIC,

      When the system administrator runs nmstatectl::persist_nic,

      Then the resultant systemd link files should contain the correct MAC addresses corresponding to each NIC.

      Definition of Done

      • The implementation meets the acceptance criteria
      • The code is part of a build attached to an errata
      • The fix is backported to RHEL-9.2.0.z

       

      Show
      Given a system administrator has configured a bond using nmstatectl with two NICs, and the yaml configuration for NMStateConfig specifies distinct MAC addresses for each NIC, When the system administrator runs nmstatectl::persist_nic , Then the resultant systemd link files should contain the correct MAC addresses corresponding to each NIC. Definition of Done The implementation meets the acceptance criteria The code is part of a build attached to an errata The fix is backported to RHEL-9.2.0.z  
    • Pass

      Description of problem:
      nmstatectl's new persist-nic-names tool (https://github.com/nmstate/nmstate/pull/2301/commits/45a382e2723749c8955fa208cb7e40620fb80d45#diff-037c6f719babb7a702deb8727cf5b1e6f4db57014a1e2d7808ad02b0e11f5b70R101-R109) uses bond's MAC instead of NIC's permanent hw address when creating link for subordinates, resulting in link files containing the wrong MAC address.

      e.g.

      nmstatectl::persist_nic] Persisting the interface with MAC B8:3F:D2:86:13:D0 to interface name eno34
      nmstatectl::persist_nic] Persisting the interface with MAC B8:3F:D2:86:13:D0 to interface name eno34
      nmstatectl::persist_nic] Persisting the interface with MAC B8:3F:D2:86:13:D0 to interface name eno33
      nmstatectl::persist_nic] Persisting the interface with MAC B8:3F:D2:86:13:D0 to interface name eno33

      Even when yaml contains:

      apiVersion: agent-install.openshift.io/v1beta1
      kind: NMStateConfig
      metadata:
      labels:
      infraenvs.agent-install.openshift.io: lab-stable-spoke1-dc-iad2
      agent-install.openshift.io/bmh: node06
      clustername: lab-stable-spoke1-dc-iad2
      name: node06
      namespace: lab-stable-spoke1-dc-iad2
      spec:
      config:
      interfaces:

      • ipv4:
        auto-dns: true
        auto-gateway: true
        auto-routes: true
        enabled: true
        dhcp: true
        link-aggregation:
        mode: 802.3ad
        options:
        miimon: "100"
        port:
      • eno33
      • eno34
        name: bond0
        state: up
        type: bond
        mtu: 9000
        interfaces:
      • macAddress: B8:3F:D2:86:13:D0
        name: eno33
      • macAddress: B8:3F:D2:86:13:D1
        name: eno34

      Version-Release number of selected component (if applicable):
      NetworkManager-libnm-1.42.2-3.el9_2.x86_64 Fri Jul 14 00:16:28 2023

      Actual results:
      eno34 becomes eno34np1 instead of eno34:

      etc/systemd/network/98-nmstate-eno33.link

      1. Generated by nmstate
        [Match]
        MACAddress=B8:3F:D2:86:13:D0

      [Link]
      Name=eno33

      etc/systemd/network/98-nmstate-eno34.link

      1. Generated by nmstate
        [Match]
        MACAddress=B8:3F:D2:86:13:D0

      [Link]
      Name=eno34

      Expected results:

      eno34 not eno34np1

      etc/systemd/network/98-nmstate-eno34.link

      1. Generated by nmstate
        [Match]
        MACAddress=B8:3F:D2:86:13:D1 ##<<<---- permanent HW address

      [Link]
      Name=eno34

      Additional info:

            fge@redhat.com Gris Ge
            rhn-support-cutaylor Curtis Taylor
            Gris Ge Gris Ge
            Mingyu Shi Mingyu Shi
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: