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

Failed to specify controller for bond when this bond contains port in desired state

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.5
    • nmstate
    • sst_network_management
    • ssg_networking
    • False
    • Hide

      None

      Show
      None
    • Hide

      Given a system adminstrator has created a linux bridge and attempts to configure a bond interface with ports and specifies BR-DHCP2 as the controller for the bond interface using  nmstate,

      When, they apply the configuration where the bond interface includes specific ports and is set to be controlled by an already existing bridge,

      Then, the configuration is correctly applied without throwing an `InvalidArgument` error related to the controller and the bond interface with its ports is correctly attached to the specified bridge controller.

      Definition of Done:

      • The implementation meets the acceptance criteria
      • Integration tests are written and pass 
      • The fix is part of a downstream build attached to an errata 
      Show
      Given a system adminstrator has created a linux bridge and attempts to configure a bond interface with ports and specifies BR-DHCP2 as the controller for the bond interface using  nmstate, When, they apply the configuration where the bond interface includes specific ports and is set to be controlled by an already existing bridge, Then, the configuration is correctly applied without throwing an `InvalidArgument` error related to the controller and the bond interface with its ports is correctly attached to the specified bridge controller. Definition of Done: The implementation meets the acceptance criteria Integration tests are written and pass  The fix is part of a downstream build attached to an errata 

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

      It's very similar with https://issues.redhat.com/browse/RHEL-31977 , in the reproducer of RHEL-31977, it is pass in the last step as there is no any port in bond0_p. In the current case, bond0_p contains port and fails.

      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
          port:
          - veth0_p
          - veth1_p
      - name: veth0_p
        type: veth
        state: up
        veth:
          peer: veth0
      - name: veth1_p
        type: veth
        state: up
        veth:
          peer: veth1" | nmstatectl apply # <----------------- pass when all 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
          port:
          - veth0_p
          - veth1_p" | nmstatectl apply # <----------------- FAIL: NmstateError: InvalidArgument: Interface bond0_p has controller BR-DHCP2 but not listed in port list of controller interface
      
      echo "
      interfaces:
      - name: bond0_p
        type: bond
        controller: BR-DHCP2
        state: up
        mtu: 9000
        link-aggregation:
          mode: 802.3ad
          port:
          - veth0_p
          - veth1_p" | nmstatectl apply
      # also FAIL [2024-04-07T12:19:26Z ERROR nmstate::ifaces::inter_ifaces] Failed to set up priority: please order the interfaces in desire state to place controller before its ports
      # NmstateError: InvalidArgument: Failed to set up priority: nmstate only support nested interface up to 4 levels. To support more nest level, please order the interfaces in desire state to place controller before its ports
      

      Expected results

      Pass

      Actual results

      Failed even the nested level is less than 4 (BR-DHCP2 <-- bond0_p <-- 2 veths)

            rh-ee-sfaye Stanislas Faye
            rh-ee-mshi1 Mingyu Shi
            Network Management Team Network Management Team
            Mingyu Shi Mingyu Shi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: