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

Attaching an unmanaged bond to linux bridge got error "mandatory option 'mode' is missing"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.5
    • nmstate
    • No
    • None
    • rhel-sst-network-management
    • ssg_networking
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Hide

      Given a system administrator has created an unmanaged bond and attempts to attach it to a Linux bridge using nmstatectl,

      When they apply the configuration,

      Then, the system should accept the bond as part of the bridge and no error related to missing mandatory options should be returned.

      Definition of Done:

      • The implementation meets the acceptance criteria
      • Integration tests are written and pass
      • The code is part of a downstream build attached to an errata
      Show
      Given a system administrator has created an unmanaged bond and attempts to attach it to a Linux bridge using nmstatectl, When they apply the configuration, Then, the system should accept the bond as part of the bridge and no error related to missing mandatory options should be returned. Definition of Done: The implementation meets the acceptance criteria Integration tests are written and pass The code is part of a downstream build attached to an errata
    • None
    • None
    • None

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

      Try attaching an unmanaged bond to linux bridge, got error "mandatory option 'mode' is missing"

      Please provide the package NVR for which bug is seen:

      nmstate-2.2.33-1.el9.x86_64
      NetworkManager-1.48.6-1.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce

      ip link add bond0 type bond
      
      echo "
      interfaces:
      - name: br0
        type: linux-bridge
        state: up
        bridge:
          port:
          - name: bond0
      " | nmstatectl apply
      
      echo "
      interfaces:
      - name: br0
        type: linux-bridge
        state: up
        bridge:
          port:
          - name: bond0
      - name: bond0
        type: bond
        state: up
      " | nmstatectl apply
      
      echo "
      interfaces:
      - name: bond0
        type: bond
        state: up
      " | nmstatectl apply
      

      Expected results

      All 3 apply actions should be OK

      Actual results

      Only the last one works:

      [12:10:59@vm-10-0-185-94 ~]0# echo "
      interfaces:
      - name: br0
        type: linux-bridge
        state: up
        bridge:
          port:
          - name: bond0
      " | nmstatectl apply
      [2024-08-09T04:11:07Z INFO  nmstatectl] Nmstate version: 2.2.33
      [2024-08-09T04:11:07Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:07Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:07Z INFO  nmstate::ifaces::inter_ifaces_controller] Controller interface br0(linux-bridge) contains port bond0 which is currently ignored, marking this port as 'state: up'. 
      [2024-08-09T04:11:07Z INFO  nmstate::query_apply::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/220
      [2024-08-09T04:11:07Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:07Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:07Z INFO  nmstate::nm::query_apply::profile] Creating connection UUID Some("24d8bd5a-f713-4ec1-9520-0eee4b43a7e6"), ID Some("bond0"), type Some("bond") name Some("bond0")
      [2024-08-09T04:11:07Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:07Z INFO  nmstate::query_apply::net_state] Rollbacked to checkpoint /org/freedesktop/NetworkManager/Checkpoint/220
      NmstateError: InvalidArgument: Connection(InvalidProperty):bond.options: mandatory option 'mode' is missing
      [12:11:07@vm-10-0-185-94 ~]1# 
      [12:11:09@vm-10-0-185-94 ~]1# echo "
      interfaces:
      - name: br0
        type: linux-bridge
        state: up
        bridge:
          port:
          - name: bond0
      - name: bond0
        type: bond
        state: up
      " | nmstatectl apply
      [2024-08-09T04:11:18Z INFO  nmstatectl] Nmstate version: 2.2.33
      [2024-08-09T04:11:18Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:18Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:18Z INFO  nmstate::query_apply::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/221
      [2024-08-09T04:11:18Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:18Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:18Z INFO  nmstate::nm::query_apply::profile] Creating connection UUID Some("b6f5295a-4f23-479e-beaf-6800b749da02"), ID Some("br0"), type Some("bridge") name Some("br0")
      [2024-08-09T04:11:18Z INFO  nmstate::nm::query_apply::profile] Creating connection UUID Some("d5fa1780-af0d-478b-8c5d-87059e77e8b9"), ID Some("bond0"), type Some("bond") name Some("bond0")
      [2024-08-09T04:11:18Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:18Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 71
      [2024-08-09T04:11:18Z INFO  nmstate::query_apply::net_state] Rollbacked to checkpoint /org/freedesktop/NetworkManager/Checkpoint/221
      NmstateError: InvalidArgument: Connection(InvalidProperty):bond.options: mandatory option 'mode' is missing
      [12:11:18@vm-10-0-185-94 ~]1# 
      [12:11:19@vm-10-0-185-94 ~]1# echo "
      interfaces:
      - name: bond0
        type: bond
        state: up
      " | nmstatectl apply
      [2024-08-09T04:11:28Z INFO  nmstatectl] Nmstate version: 2.2.33
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 71
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 71
      [2024-08-09T04:11:28Z INFO  nmstate::query_apply::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/222
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 71
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 70
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 71
      [2024-08-09T04:11:28Z INFO  nmstate::nm::query_apply::profile] Creating connection UUID Some("817ebdcd-596b-4f10-8da4-601607d8f116"), ID Some("bond0"), type Some("bond") name Some("bond0")
      [2024-08-09T04:11:28Z INFO  nmstate::nm::query_apply::profile] Activating connection 817ebdcd-596b-4f10-8da4-601607d8f116: bond0/bond
      [2024-08-09T04:11:28Z WARN  nmstate::nm::nm_dbus::device] Unknown Device state reason 71
      [2024-08-09T04:11:28Z INFO  nmstate::query_apply::net_state] Destroyed checkpoint /org/freedesktop/NetworkManager/Checkpoint/222
      route-rules: {}
      routes: {}
      interfaces:
      - name: bond0
        type: bond
        state: up
      ovn: {}
      

       

              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: