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

Saving route rules should also refer to `auto-route-table-id`

    • No
    • Moderate
    • 1
    • rhel-sst-network-management
    • ssg_networking
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • Future releases
    • Hide

      Given a system administrator applies network configuration with auto-route-table-id enabled,

      When route rules are saved after configuration,

      Then the rules should be assigned to the correct interface associated with the specified route table and not to the loopback interface.

      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 applies network configuration with auto-route-table-id enabled, When route rules are saved after configuration, Then the rules should be assigned to the correct interface associated with the specified route table and not to the loopback interface. 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?

      According to https://github.com/nmstate/nmstate/commit/36af0f8580a056597b2172bcc47f62afe335fb3b : If rule has table id, we find a interface in desire state configured for that route table

      But this doesn't work for `auto-route-table-id`, in this case, nmstate still saves the route rules into loopback iface.

      What is the impact of this issue to you?

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

      nmstate-2.2.38-1.el9.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      cat << EOF > ovs_pbr.yaml
      interfaces:
        - name: ovsbr0
          type: ovs-interface
          state: up
          ipv4:
            enabled: true
            dhcp: true
            auto-dns: false
            auto-routes: true
            auto-gateway: true
            auto-route-table-id: 500
          ipv6:
            enabled: true
            dhcp: true
            auto-dns: false
            auto-routes: true
            auto-gateway: true
            auto-route-table-id: 500
        - name: ovs-br0
          type: ovs-bridge
          state: up
          bridge:
            port:
              - name: veth0
              - name: ovsbr0
        - name: veth0
          type: veth
          state: up
          veth:
            peer: veth0_p
      EOF
      cat << EOF > add_pbr.yaml
      ---
      route-rules:
        config:
          - route-table: 500
            priority: 3200
            ip-from: 192.0.3.0/24
          - route-table: 500
            priority: 3200
            ip-to: 192.0.3.0/24
          - route-table: 500
            priority: 3200
            ip-to: 192::/64
          - route-table: 500
            priority: 3200
            ip-from: 192::/64
      EOF
      nmstatectl apply ovs_pbr.yaml
      nmstatectl apply add_pbr.yaml
      nmcli con show lo | grep rule
      

      (It's no difference whether ovsbr0 got DHCP response or not)

      Expected results

      nmstate should save the route rules which mentioned route-table=500 into ovsbr0 which has the DHCP route table 500

      Actual results

      The rules are saved into lo

              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: