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

Nmpolicy cannot change interface identifier to mac-address

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.4.z
    • nmstate
    • nmstate-2.2.35-1.el9
    • No
    • None
    • 1
    • rhel-sst-network-management
    • ssg_networking
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • NMT - RHEL-9.5 DTM 24
    • None

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

       

      I want to change NetworkManager gateway connection to match interface by MAC address instead of interface name.

       

      But got failure when I apply below nmpolicy
       

      ---
      capture: 
        gw: routes.running.destination=="0.0.0.0/0"
        gw-iface: interfaces.name==capture.gw.routes.running.0.next-hop-interface
      desiredState: 
        interfaces: 
          - name: "{{ capture.gw-iface.interfaces.0.name }}"
            identifier: mac-address
            mac-address: "{{ capture.gw-iface.interfaces.0.mac-address }}"
      

      Please provide the package NVR for which bug is seen:

      nmstate-2.2.33-1.el9

      How reproducible:

      100%

      Steps to reproduce

      1.  Make sure you have NetworkManager connection holding default gateway
      2.  run `nmstatectl apply` to above YAML file
      3.  

      Expected results

      The NetworkManager connection file has `connection.interface-name` empty
      and `802-3-ethernet.mac-address` set to the MAC address of gateway interface.

      Actual results

      NmstateError: VerificationError: Verification failure: ens3.interface.identifier desire '"mac-address"', current '"name"

              rh-ee-mshi1 Mingyu Shi
              fge@redhat.com Gris Ge
              Network Management Team Network Management Team
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: