The distributed load balancer route redistribution series [0] emits one
Advertised_Route per (VIP, backend LSP) pair and gates it on the
Service_Monitor of the backend, so the fabric can steer a VIP to a
chassis that hosts a healthy local backend.  Deployments that expose an
overlay VIP through a floating IP, the way ovn-octavia-provider adds
the floating IP as an extra VIP of the load balancer, still hit several
problems:

- northd_handle_lb_data_changes() gave up on any change that involved
  a load balancer with a health check, which a distributed load
  balancer needs for its routes to be gated, so a backend added to
  such a load balancer and every status change reported by
  ovn-controller rebuilt all logical flows.
- In the controller, the flow that ct_lb_mark_local encodes to was not
  reprocessed when a backend got bound or unbound.
- In the controller, the tracked_port of a route whose backend lives
  on a non-local datapath resolved to nothing, which route_run()
  treated as "no tracked port" and advertised everywhere.
- In northd, the NAT route of an address that is also a VIP of a
  distributed load balancer shadowed the load balancer routes.
- In northd, every VIP of every load balancer was announced, including
  a VIP of a private network that another tenant uses as well.

Patch 1 fixes the FreeBSD 14 build of ovn-parallel-hmap.c by including
<sys/stat.h> for the sem_open() mode constants.  It was found while
testing the rest and can be taken separately.

Patch 2 makes northd process load balancers with health checks
incrementally.  Every service monitor remembers the load balancers
whose backends it probes and every load balancer remembers the monitors
it uses.  A Service_Monitor status change rebuilds only the flows of the
load balancers that share the monitor, and a load balancer change drops
the monitors it no longer needs without a recompute.

Patch 3 registers the port binding lookup of ct_lb_mark_local as an
lflow reference, so binding or unbinding a backend reprocesses the
flows whose encoded group depends on the local backends.

Patch 4 treats a tracked_port that the controller IDL does not hold as
bound elsewhere under local-only advertisement, instead of advertising
the route from every chassis at the default priority.

Patch 5 skips the NAT route of an address that a distributed load
balancer of the same router advertises through the same port.  The
load balancer routes carry the locality and health of the address, and
the NAT route kept the gateway chassis advertised after they were
withdrawn there.

Patch 6 adds the Load_Balancer option dynamic-routing-advertise-vips,
so that only the listed VIPs of a load balancer are advertised and
forwarded.  It keeps the VIP of a private network private when a
floating IP exposes the load balancer on the provider network.

Patch 7 adds two warnings.  One reports a VIP that is about to be
advertised and falls inside a subnet that more than one logical switch
uses, which the fabric cannot tell apart.  The other reports an entry
of dynamic-routing-advertise-vips that matches no VIP of the load
balancer.

Patch 8 adds the Logical_Router option
dynamic-routing-advertise-prefixes, with a Logical_Router_Port
override, which limits the advertisement of load balancer VIPs and NAT
external IPs to the listed prefixes.  A CMS lists the address space
that may be advertised to the fabric, for example the subnet pools
that share the address scope of the provider network, so one list on
the router replaces one list per load balancer, and a load balancer
without a list of its own cannot leak a private address through a port
of the router.

Two points about patch 4 are worth noting:

- With local-only advertisement a distributed NAT entry whose logical
  port is on a non-local datapath is no longer advertised from chassis
  that do not host the port, the same treatment load balancer backends
  already get.
- Patch 4 deliberately changes nothing when local-only is off: a
  tracked port missing from the replica is still advertised at the
  default priority and the Service_Monitor gate does not apply to it.
  The gate matches Service_Monitor rows by the port name, which only
  the Port_Binding row carries, and a chassis without the row cannot
  recover it from the raw UUID.  Fixing this needs northd to publish
  the name with the route.  Local-only advertisement, the mode this
  feature is built around, has no such gap: a chassis advertises only
  when it holds the tracked port, so its gate always finds the
  monitors.

For a CMS mapping: Neutron knows which subnets share the address scope
of the provider network and can compute the lists of patches 6 and 8
from it.  A VIP behind a NAT boundary then stays private while a VIP
of the same address space as the provider network is advertised as
itself, which is the behaviour address scopes promise.

Every patch but the first carries tests: controller tests for the
backend binding reprocessing, a system test for the non-local tracked
port, and northd tests for the monitor handling, the NAT skip, both
filters and both warnings.

Two follow-ups are deferred:

- Extending the Service_Monitor gate of patch 4 to the default mode
  needs a way to find the monitors of a tracked port that the
  controller IDL does not hold.
- The br-controller lflow node encodes ct_lb actions through its own
  callbacks without port binding references.

 [0] https://mail.openvswitch.org/pipermail/ovs-dev/2026-August/434957.html

Dmitrii Shcherbakov (8):
  lib: Include sys/stat.h for sem_open() mode constants.
  northd: Process load balancers with health checks incrementally.
  controller: Track local LB backend binding dependencies.
  controller: Treat an unresolved tracked port as bound elsewhere.
  northd: Skip the NAT route for a distributed LB VIP.
  northd: Add option to advertise a subset of LB VIPs.
  northd: Warn about LB VIPs that cannot be steered per network.
  northd: Add option to advertise only addresses in listed prefixes.

 NEWS                              |  11 +
 controller/lflow.c                |   9 +
 controller/route.c                |  20 +
 lib/ovn-parallel-hmap.c           |   1 +
 northd/en-advertised-route-sync.c | 637 +++++++++++++++++++++++++--
 northd/en-advertised-route-sync.h |   6 +
 northd/en-northd.c                |  64 ++-
 northd/en-northd.h                |   5 +
 northd/inc-proc-northd.c          |   6 +-
 northd/lb.c                       |   2 +
 northd/lb.h                       |   6 +
 northd/northd.c                   | 301 +++++++++++--
 northd/northd.h                   |  12 +-
 ovn-nb.xml                        |  92 +++-
 tests/multinode-macros.at         |   4 +-
 tests/multinode.at                |  56 +++
 tests/ovn-controller.at           | 139 ++++++
 tests/ovn-inc-proc-graph-dump.at  |   4 +-
 tests/ovn-northd.at               | 876 +++++++++++++++++++++++++++++++++++++-
 tests/system-ovn.at               | 139 ++++++++++
 20 files changed, 2310 insertions(+), 80 deletions(-)

base-commit: 1bee14c3a2607e7dff54335b44e05c987f30c23c
-- 
2.53.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to