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

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

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.2
    • rhel-9.5
    • nmstate
    • None
    • Moderate
    • 1
    • rhel-net-mgmt
    • ssg_networking
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • NMT SST - Refine next
    • Hide

      Definition of Done:

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

      ( ) The acceptance criteria defined below are met.

      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.


      ( ) Code changes are included in a downstream build attached to an errata.


      ( ) All required testing (manual and/or automated) passes successfully.


      ( ) Related documentation updates (if applicable) have been completed.

      Show
      Definition of Done: Please mark each item below with ( / ) if completed or ( x ) if incomplete: ( ) The acceptance criteria defined below are met. 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. ( ) Code changes are included in a downstream build attached to an errata. ( ) All required testing (manual and/or automated) passes successfully. ( ) Related documentation updates (if applicable) have been completed.
    • None
    • Automated
    • None

      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: