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

cannot create bond with port and controller when the controller is not mentioned

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.7
    • nmstate
    • None
    • No
    • Moderate
    • rhel-net-mgmt
    • 3
    • 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.

      Given a system administrator configuring a host running NetworkManager and nmstate, 

      When applying a YAML that references a controller that is not declared in the same YAML,
      Then:

      1. If the controller exists in current system state, the application should succeed without error
      1. If the controller does not exist in system state either, the application fails with an error. Example:
        Error: Controller 'BR-DHCP2' for interface 'bond0_p' is neither declared in YAML nor found in system state. Declare the controller or ensure it exists before applying.

      ( ) Integration test case is available upstream (Unit tests and integration tests) 


      ( ) Code is reviewed and merged upstream.


      ( ) Preliminary testing is done.

      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 administrator configuring a host running NetworkManager and nmstate,  When applying a YAML that references a controller that is not declared in the same YAML, Then: If the controller exists in current system state, the application should succeed without error If the controller does not exist in system state either, the application fails with an error. Example: Error: Controller 'BR-DHCP2' for interface 'bond0_p' is neither declared in YAML nor found in system state. Declare the controller or ensure it exists before applying. ( ) Integration test case is available upstream (Unit tests and integration tests)  ( ) Code is reviewed and merged upstream. ( ) Preliminary testing is done.
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

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

      I am unable to create a Linux bond by referencing a pre-existing permanent Linux bridge as its controller, unless the bridge is explicitly defined within the YAML configuration file. In addition, the error message provided is not sufficiently clear.

      It is similar to RHEL-31981 but not the same.

      What is the impact of this issue to you?

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

      nmstate-2.2.45-1.el9.x86_64
      NetworkManager-1.53.90-1.el9.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Ensure the Linux bridge (BR-DHCP2) is not defined in the YAML when creating bond.
      2. The bond should include `port`
      3. The port interfaces (dummys) didn't exist, should be defined within the same YAML. It doesn't matter whether the port interfaces (dummys) already exist or to be created in the YAML
      echo "
      interfaces:
      - name: BR-DHCP2
        type: linux-bridge
        state: up
      " | nmstatectl apply
      
      echo "
      interfaces:
      - name: bond0_p
        type: bond
        controller: BR-DHCP2
        state: up
        mtu: 9000
        link-aggregation:
          mode: 802.3ad
          port:
            - dummy0
            - dummy1
      - name: dummy0
        type: dummy
        state: up
      - name: dummy1
        type: dummy
        state: up
      " | nmstatectl apply  # <----- failed
      

       

      Expected results

      success

      Actual results

       

      25-06-18T03:06:58Z 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

       

      The error message is not clear yet:

      1. There are only 3 levels: BR-DHCP2 - - - bond0_p - - - dummys
      2. despite the level counts, placing BR-DHCP2 at the end of the YAML will work, even after its port (bond0_p)

              nm-team Network Management Team
              rh-ee-mshi1 Mingyu Shi
              Network Management Team Network Management Team
              Mingyu Shi Mingyu Shi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: