Skip to content

feat: Support OVN dynamic routing - #3557

Open
ibot3 wants to merge 1 commit into
lxc:mainfrom
ibot3:ovn-dynamic-routing
Open

ibot3 wants to merge 1 commit into
lxc:mainfrom
ibot3:ovn-dynamic-routing

Conversation

@ibot3

@ibot3 ibot3 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Add two new config options to networks that can be uplink network for OVN networks: ovn.dynamic_routing and ovn.dynamic_routing.vrf.id

When configured, dynamic-routing [0] will be enabled on OVN networks using this uplink network. With that, prefixes of ovn networks and load-balancers are added to the configured host routing table (vrf.id) of the active OVN chassis.

[0] https://docs.ovn.org/en/latest/topics/dynamic-routing/architecture.html

Why?

We have a setup where our incus nodes do not have a shared L2 connection, but all run a local routing daemon.
Currently, incus requires a shared L2 uplink network for OVN networks.
My plan was to configure an uplink bridge on each node, which is not directly connected to the fabric nor other nodes.
Instead, the local routing daemon distributes the routes coming directly from the OVN active gateway.

Using the bgp integration is no good option, as this would create a hard dependency on the incus daemon running.
(Only one host (=the active gateway) can announce the prefix)

@ibot3
ibot3 requested a review from stgraber as a code owner June 28, 2026 09:50
@github-actions github-actions Bot added the Documentation Documentation needs updating label Jun 28, 2026
@ibot3
ibot3 force-pushed the ovn-dynamic-routing branch 2 times, most recently from ca360bd to 11a0af2 Compare June 28, 2026 10:07
Add two new config options to networks that can be uplink network for OVN networks:
`ovn.dynamic_routing` and `ovn.dynamic_routing.vrf.id`

When configured, dynamic-routing [0] will be enabled on OVN networks using this uplink
network. With that, prefixes of ovn networks and load-balancers are added to the
configured host routing table (`vrf.id`) of the active OVN chassis.

[0] https://docs.ovn.org/en/latest/topics/dynamic-routing/architecture.html

Signed-off-by: Jakob Mueller <me@jakobm.de>
@ibot3
ibot3 force-pushed the ovn-dynamic-routing branch from 11a0af2 to 0176b92 Compare June 28, 2026 10:15
@ibot3

ibot3 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

I also took a look on how to test this in lxc-ci, but it seems that ovn comes from https://ppa.launchpadcontent.net/stgraber/ovn-stable/ubuntu/ which does not have a recent enough ovn version.
I don't know why you chose not to use the ubuntu-shipped version, but even with that, we would need to switch to Ubuntu 26.04

@ibot3

ibot3 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Just discovered a bad caveat:
When there are multiple OVN gateways on the same chassis with the same vrf id, only one prefix makes it into the routing table.
That limits the number of ovn networks per vrf to 1, which is quite frustrating.
I have to think about that.

@stgraber

Copy link
Copy Markdown
Member

We should move the daily tests to Debian 13 and using https://github.com/zabbly/ovn for the packages. That PPA is effectively dead at this point, we just haven't spent the time to update the tests yet.

@stgraber

Copy link
Copy Markdown
Member

@ibot3 any update on this one?

@ibot3

ibot3 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

I am currently in the process of getting the change into OVN.

But I also wanted to check if OVN has some option to allow multiple active gateway chassis for the same network, as this would give a better redundancy.

@stgraber stgraber added the Blocked Waiting on an external task label Jul 20, 2026
@ibot3

ibot3 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

The fix is now upstream at OVN:
ovn-org/ovn@92c7ab5

But it will probably land in OVN 26.09 and therefore not in the versions shipped by default by current Debian/Ubuntu releases.
@stgraber what do you think about the MR in general? Would you be happy with it?

I would suggest adding a note to the documentation describing the limitation with older (<26.09) OVN versions.

@ibot3

ibot3 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@stgraber Ping :)

@stgraber

Copy link
Copy Markdown
Member

I'd probably keep it simpler with just ovn.routes_vrf as the config option, if not set, it's disabled, if set to a VRF, it's enabled. Keeps the pattern mostly in line with what we already have with ingress_mode.

Otherwise, we'll want the branch split into our usual set of commits for a feature like this, basically:

  • API extension
  • OVN database addition (ovn_nb)
  • One commit per network driver
  • Commit for the doc tutorial
  • Commit to pick up the auto-generated config/metadata files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked Waiting on an external task Documentation Documentation needs updating

Development

Successfully merging this pull request may close these issues.

2 participants