[Bug 2127934] Re: [ovn-controller] Learning two routes with same destination and next-hop breaks the controller

Ubuntu Foundations Team Bug Bot 2127934 at bugs.launchpad.net
Thu Oct 16 04:22:30 UTC 2025


The attachment "MicroOVN patch for the reproduced" seems to be a patch.
If it isn't, please remove the "patch" flag from the attachment, remove
the "patch" tag, and if you are a member of the ~ubuntu-reviewers,
unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to ovn in Ubuntu.
https://bugs.launchpad.net/bugs/2127934

Title:
  [ovn-controller] Learning two routes with same destination and next-
  hop breaks the controller

Status in ovn package in Ubuntu:
  New

Bug description:
  Ubuntu release: 25.10 (questing)
  Package version: 25.09.0-1
  (The route learning feature was introduced in 25.03, so the plucky version is likely affected too)

  # Description
  The situation described in the title can happen if the VRF, from which ovn-controller learns routes, has two routes (e.g. default routes) through the same next hop, but learned from a different protocols. In such case, the controller enters into a loop in which it tries to insert second route to the Learned_Routes table, but the transaction gets rejected for constraints violation. This completely bricks the controller, consuming 100%CPU and being unable to send any updates to the SB database due to the transaction getting rejected.

  
  # Reproducer

  Easiest way to reproduce this is through microovn system tests because
  they can induce this exact situation.

  1. Get microovn [0] rev 822a159e9b962bbbaf8d470c10e33b22273b01d1
  2. Apply attached micrrovn.diff patch. (This allows the problematic situation to occur in tests and pauses the tests when the issue is triggered)
  3. Run `make tests/bgp_data_plane.bats`
  4. Wait for tests to set up the scenario. Message 'Test connectivity from External network via TOR to OVN NAT IP' shows up
  5. Get shell in the test container `lxc exec microovn-bgp-data-plane-1 bash`
  6. Observe two routes in the VRF. One inserted by the Bird and one automatically learned from observed RAs

  $ ip -6 route show vrf ovnvrf10
  fe80::/64 dev veth1-bgp proto kernel metric 256 pref medium
  multicast ff00::/8 dev veth1-bgp proto kernel metric 256 pref medium
  default via fe80::216:3eff:fe9f:a39 dev veth1-bgp proto bird metric 32 pref medium
  default via fe80::216:3eff:fe9f:a39 dev veth1-bgp proto ra metric 1024 expires 28sec hoplimit 64 pref medium

  7. Observe following transaction error in the 'snap.microovn.chassis'
  service logs. The message will be near the top of the log with the
  rest being spammed by OVNSB commit failed messages

  ovs|00054|ovsdb_idl|WARN|transaction error: {"details":"Transaction
  causes multiple rows in \"Learned_Route\" table to have identical
  values (0a89be80-21eb-4302-a6a0-ba5b54daa598,
  e07683a0-961f-44ce-88b1-88f2a9f068f4, \"::/0\", and
  \"fe80::216:3eff:fe9f:a39\") for index on columns \"datapath\",
  \"logical_port\", \"ip_prefix\", and \"nexthop\".  First row, with
  UUID 8abd01e3-9204-443a-979f-60c466aa51c6, was inserted by this
  transaction.  Second row, with UUID
  90044a45-cb3c-40f9-b217-1892e816bd75, existed in the database before
  this transaction and was not modified by the
  transaction.","error":"constraint violation"}

  8. Once you are done, hitting `Enter` in the terminal that runs tests
  will let the tests finish and clean up.


  # Probable root cause

  Looking at the schema for the Learned_Routes table in the SB database
  [1], the entries do not consider protocol from which the route was
  learned. From the point of view of the Database, the controller is
  trying to insert two routes with the same "datapath", "logical_port",
  "ip_prefix" and "next_hop", which violates the uniqueness constraints.
  of the indexes.

  [0] https://github.com/canonical/microovn

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ovn/+bug/2127934/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list