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

[RFE] Support capture rule of alt-name in nmpolicy

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-10.2
    • nmstate
    • None
    • None
    • None
    • rhel-net-mgmt
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Hide

      Definition of Done:

      Please mark each item below with ( / ) if completed or ( x ) if incomplete:

      ( ) The acceptance criteria defined below are met.

      None


      ( ) Integration test case is available upstream.


      ( ) Code is reviewed and merged upstream.


      ( ) Preliminary testing is done.


      ( ) Upstream documentation is written in the upstream MR.


      ( ) Release notes text is written in the RHEL issue.


      ( ) A demo is recorded

      Show
      Definition of Done: Please mark each item below with ( / ) if completed or ( x ) if incomplete: ( ) The acceptance criteria defined below are met. None ( ) Integration test case is available upstream. ( ) Code is reviewed and merged upstream. ( ) Preliminary testing is done. ( ) Upstream documentation is written in the upstream MR. ( ) Release notes text is written in the RHEL issue. ( ) A demo is recorded
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

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

      Cannot capture interface using alternative name

      What is the impact of this issue to you?

      OCP use nmpolicy to copy physical interface MAC and IP to OVS bridge after attached this physical interface to this OVS bridge.

      Please provide the package NVR for which the bug is seen:

      nmstate-2.2.57-1.el10

      How reproducible is this bug?:

      100%

      Steps to reproduce

      echo '
      ---
      interfaces:
        - name: port1
          type: ethernet
          identifier: mac-address
          mac-address: 52:54:00:15:17:63
          alt-names:
            - name: port1
            - name: primary' | sudo nmstatectl apply -
      
      echo 'capture:
        base-iface: interfaces.alt-name == "primary"
      desired:
        interfaces:
        - name: br1
          type: linux-bridge
          state: up
          mac-address: "{{ capture.base-iface.interfaces.0.mac-address }}"
          ipv4: "{{ capture.base-iface.interfaces.0.ipv4 }}"
          ipv6: "{{ capture.base-iface.interfaces.0.ipv6 }}"
          bridge:
              port:
              - name: primary' > policy.yml
      
      nmstatectl apply policy.yml
      

      Expected results

      Nmstate copy the MAC/IP of interface holding MAC 52:54:00:15:17:63 to newly created linux bridge.

      Actual results

      NmstateError: PolicyError: interface with 'alt-name=primary' not found

      interfaces.alt-name == "primary"
      ...........

              nm-team Network Management Team
              fge@redhat.com Gris Ge
              Network Management Team Network Management Team
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: