Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-2080

OVN dynamic routing - Learning two routes with same destination and next-hop breaks the controller

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • OVN
    • None
    • OVN dynamic routing - Learning two routes with same destination and next-hop breaks the controller
    • 5
    • False
    • False
    • Hide

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

      ( ) The acceptance criteria defined below are met.

      Given OVN dynamic routing learns multiple routes with the same destination and nexthop but different metrics,
      When ovn-controller processes these routes,
      Then only the route with the best (lowest) metric is maintained in the SB Learned_Route table. Also, route updates automatically select the current best metric route and no constraint violations occur in the SB database.


      ( ) The epics work is available in a downstream build (nightly/Async or other)


      ( ) All cards under the epic have been moved to Done

      Show
      Please mark each item below with ( / ) if completed or ( x ) if incomplete: ( ) The acceptance criteria defined below are met. Given OVN dynamic routing learns multiple routes with the same destination and nexthop but different metrics, When ovn-controller processes these routes, Then only the route with the best (lowest) metric is maintained in the SB Learned_Route table. Also, route updates automatically select the current best metric route and no constraint violations occur in the SB database. ( ) The epics work is available in a downstream build (nightly/Async or other) ( ) All cards under the epic have been moved to Done
    • rhel-9
    • rhel-net-ovn
    • 89% To Do, 0% In Progress, 11% Done
    • ssg_networking

      This epic tracks all the effort needed to deliver the solution related to the bug described below.

       Problem Description: Clearly explain the issue.

      This was originally reported upstream at:

      https://bugs.launchpad.net/ubuntu/+source/ovn/+bug/2127934

       Impact Assessment: Describe the severity and impact (e.g., network down,availability of a workaround, etc.).

      Network down in the scenario described above.

       Software Versions: Specify the exact versions in use (e.g.,openvswitch3.1-3.1.0-147.el8fdp).

      OVN 25.03, including ovn25.03-25.03.1-86.el9fdp

        Issue Type: Indicate whether this is a new issue or a regression (if a regression, state the last known working version).

      Day one issue.

       Reproducibility: Confirm if the issue can be reproduced consistently. If not, describe how often it occurs.

      Yes.

       Reproduction Steps: Provide detailed steps or scripts to replicate the issue.

      Simplified reproducer:

      ovn-nbctl lr-add lr1                                          \
        -- set logical_router lr1 options:dynamic-routing=true      \
                                 options:chassis=chassis-1          \
                                 options:requested-tnl-key=42       \
        -- lrp-add lr1 lrp1 00:00:00:00:00:01 1.1.1.1/24            \
          -- lrp-set-options lrp1 dynamic-routing-maintain-vrf=true \
        -- ls-add ls1                                               \
          -- lsp-add ls1 lsp1                                       \
          -- lsp-set-type lsp1 router                               \
          -- lsp-set-addresses lsp1 router                          \
          -- lsp-set-options lsp1 router-port=lrp1
      
      ip link add name lo-test type dummy
      ip link set dev lo-test master ovnvrf42
      ip a a dev lo-test 1.1.1.2/24
      ip link set dev lo-test up
      
      ip r a table 42 default via 1.1.1.2 metric 32
      ip r a table 42 default via 1.1.1.2 metric 33 

       Expected Behavior: Describe what should happen under normal circumstances.

      ovn-controller should not try to insert duplicate Learned_Route entries, it should only try to learn the one with the best metric.

       Observed Behavior: Explain what actually happens.

      This last route, metric 33, causes ovn-controller to try to insert duplicate SB.Learned_Route entries, e.g., from the ovn-controller logs:

      2025-10-22T09:46:40.022Z|00057|ovsdb_idl|WARN|transaction error: {"details":"Transaction causes multiple rows in \"Learned_Route\" table to have identical values (b5972a38-818d-447f-b149-f73ad3e23449, 6ff3a131-fc2a-4b27-86a7-7203cd3700fb,
       \"0.0.0.0/0\", and \"1.1.1.2\") for index on columns \"datapath\", \"logical_port\", \"ip_prefix\", and \"nexthop\".  First row, with UUID e9558e35-016f-4bd5-886e-de3a35c14aa1, existed in the database before this transaction and was not 
      modified by the transaction.  Second row, with UUID c23523e9-3a56-41de-9490-bb53ce4486f4, was inserted by this transaction.","error":"constraint violation"}
      2025-10-22T09:46:40.023Z|00058|main|INFO|OVNSB commit failed, force recompute next time.

       Troubleshooting Actions: Outline the steps taken to diagnose or resolve the issue so far.

       

       Logs: If you collected logs please provide them (e.g. sos report, /var/log/openvswitch/* , testpmd console)

              ovnteam@redhat.com OVN Team
              dceara@redhat.com Dumitru Ceara
              OVN QE OVN QE
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: