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

Failed when an existing controller iface is specified in `interfaces` and referred by to-be-created subordinate

    • nmstate-2.2.33-1.el9
    • None
    • None
    • 1
    • rhel-sst-network-management
    • ssg_networking
    • 18
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • NMT - RHEL-9.5 DTM 16
    • Hide

      Given a system administrator has already created a bridge using Nmstate and aims to create a new bond to attach to this bridge, 

      When they apply a new configuration specifying both the existing bridge and the new bond setup to be created and linked to the bridge,

      Then, Nmstate should successfully create and attach the bond to the bridge without generating an error.

      Definition of Done:

      • The implementation meets the acceptance criteria
      • The integration tests are written and pass 
      • The fix is part of a downstream build attached to an errata
      Show
      Given a system administrator has already created a bridge using Nmstate and aims to create a new bond to attach to this bridge,  When they apply a new configuration specifying both the existing bridge and the new bond setup to be created and linked to the bridge, Then, Nmstate should successfully create and attach the bond to the bridge without generating an error. Definition of Done: The implementation meets the acceptance criteria The integration tests are written and pass  The fix is part of a downstream build attached to an errata
    • Pass
    • None
    • None

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

      I've created a bridge(BR-DHCP2) with nmstate, after that I want to create a bond(bond0_p) attaching to the bridge, when I also list the bridge in `interfaces`, it failed.

      3 conditions to reproduce:

      1. The controller(BR-DHCP2) already exists
      2. The controller is listed under `interfaces` key in the desired state, and it doesn't mention `port`(hence nmstaet shouldn't touch `port` part)
      3. The subordinate(bond0_p) doesn't exist before, to be created in the desired state

      The error is same with https://issues.redhat.com/browse/RHEL-1414 but the reproducer is different.

      Please provide the package NVR for which bug is seen:

      nmstate-2.2.27-1.el9.x86_64
      nispor-1.2.14-1.el9.x86_64
      NetworkManager-1.47.2-1.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce

      echo "
      interfaces:
      - name: BR-DHCP2
        type: linux-bridge
        state: up
      - name: bond0_p
        type: bond
        controller: BR-DHCP2
        state: up
        mtu: 9000
        link-aggregation:
          mode: 802.3ad" | nmstatectl apply # <----------------- pass when both didn't exist before 
      
      echo "
      interfaces:
      - name: bond0_p
        type: bond
        state: absent" | nmstatectl apply
      
      echo "
      interfaces:
      - name: BR-DHCP2
        type: linux-bridge
        state: up
      - name: bond0_p
        type: bond
        controller: BR-DHCP2
        state: up
        mtu: 9000
        link-aggregation:
          mode: 802.3ad" | nmstatectl apply # <----------------- FAIL: BR-DHCP2 exists + creating bond0_p
      
      echo "
      interfaces:
      - name: bond0_p
        type: bond
        controller: BR-DHCP2
        state: up
        mtu: 9000
        link-aggregation:
          mode: 802.3ad" | nmstatectl apply # <----------------- pass when BR-DHCP2 is not listed in `interfaces`
      

      Expected results

      Pass

      Actual results

      NmstateError: InvalidArgument: Interface bond0_p has controller BR-DHCP2 but not listed in port list of controller interface

              liangwen12year Wen Liang
              rh-ee-mshi1 Mingyu Shi
              Network Management Team Network Management Team
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: