[OVN] Collocate the external ports in the same chassis as the gateway port

Bug #2125553 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Medium
Rodolfo Alonso

Bug Description

This bug is related to the N/S routing capabilities in ML2/OVN.

In OVN, baremetal ports and SR-IOV ports are considered as external. It is needed to bind these external ports to a chassis to receive/send traffic to the physical ports.

In Neutron ML2/OVN, there are two different strategies to schedule ports:
* Router gateway ports: the OVN L3 scheduler uses a set of Gateway_Chassis registers, associated to different gateway nodes, to provide HA to the router gateway ports. This set of Gateway_Chassis registers are associated 1:1 to a single router. That means, each router will have its own independent set of Gateway_Chassis registers.
* External ports: once created, the ML2/OVN plugin creates a HA_Chassis_Group with different HA_Chassis registers, associated to different gateway chassis. This is similar to the previous strategy (but Gateway_Chassis will be deprecated). A HA_Chassis_Group is created per network.

If an external port is connected to a router, nothing guarantees that the external port is bound to the same chassis as the router gateway port. The goal of this bug is to provide a method to, once an external port (its network) is connected to a router, the scheduler of both resources matches and both ports (external port, router gateway port) are bound to the same chassis.

Jira ticket: `https://issues.redhat.com/browse/OSPRH-20085
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1829762

Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962155

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962402

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962403

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962404

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962406

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962568

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962569

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Rodolfo Alonso <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962403

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/962662

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/962402
Committed: https://opendev.org/openstack/neutron/commit/5cfdb6dc78d74de2a1d85e8c48f775694f3ccfce
Submitter: "Zuul (22348)"
Branch: master

commit 5cfdb6dc78d74de2a1d85e8c48f775694f3ccfce
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Sep 25 15:05:09 2025 +0000

    [OVN] Simplify the logic to create a "HA_Chassis_Group"

    This patch simplifies the logic for the "HA_Chassis_Group" creation.
    The method creates 3 list/sets:
    * A list/set of chassis to be deleted.
    * A list/set of chassis to be added.
    * A list/set of chassis to be kept.

    If the "HA_Chassis_Group" is already present and the highest priority
    chassis is not deleted, it must keep the highest priority to avoid
    rebinding the external ports into another chassis.

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: Ibf3b4f108058387d4a9689d6411139e7727b1315

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/neutron/+/962404
Committed: https://opendev.org/openstack/neutron/commit/817a443a20c1978e3cd12fe9ced1515e5e135dd2
Submitter: "Zuul (22348)"
Branch: master

commit 817a443a20c1978e3cd12fe9ced1515e5e135dd2
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Sep 26 20:35:26 2025 +0000

    [OVN] Remove maintenance method "check_for_ha_chassis_group"

    This method ensures that there is a "HA_Chassis_Group" for any external
    port created. This is already enforced by the API when an external port
    is created. This method is no longer needed.

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: I931813395d790f0220a6a56a7224602325c791d2

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/neutron/+/962406
Committed: https://opendev.org/openstack/neutron/commit/7bc4ecf2290cbf808704d126e132b3c2d5043a02
Submitter: "Zuul (22348)"
Branch: master

commit 7bc4ecf2290cbf808704d126e132b3c2d5043a02
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Sep 26 21:09:07 2025 +0000

    [OVN] Remove check for external ports support

    The field "ha_chassis_group" was added to the "Logical_Switch_Port"
    table in [1], that was released in OVN v20.03.0. Neutron enforces
    newer versions of OVN to work properly.

    [1]https://github.com/ovn-org/ovn/commit/b31c76000bef314b68e776d318d1ce4cf152450b

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: Iff2ebe33d5ca454e06b914313ca124c105c4dedb

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/neutron/+/962568
Committed: https://opendev.org/openstack/neutron/commit/633ff6093bf7de8c724b310cac18b2b1a709effc
Submitter: "Zuul (22348)"
Branch: master

commit 633ff6093bf7de8c724b310cac18b2b1a709effc
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Sep 29 14:25:32 2025 +0000

    [OVN] Add the physical network to the ``Logical_Switch`` register

    Now the ``Logical_Switch`` register (that represents an OVN network),
    stored the physical in the "external_ids" field, if the network has it.
    If not, this field won't be present.

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: I4e7c78da3bc0367f7208477a4d84dd970c9d366c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/neutron/+/962569
Committed: https://opendev.org/openstack/neutron/commit/a5ca6d2bb8a2d6df92ecb09ad19898e7e2532d91
Submitter: "Zuul (22348)"
Branch: master

commit a5ca6d2bb8a2d6df92ecb09ad19898e7e2532d91
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Sep 29 10:34:04 2025 +0000

    [OVN] Add method ``sync_ha_chassis_group_network_unified``

    This new method is meant to be used when a network with external ports
    is connected to a router. In this case, it is needed to create a single
    scheduler for all the ports connected to the router and matching the
    same chassis as the gateway router port.

    This method uses the network ID to assign the group name. It also uses
    a defined chassis priority (that will match the gateway router port
    assignation). The created ``HA_Chassis_Group`` must have a set of
    ``HA_Chassis`` registers that should have the same chassis name and
    priority as the gateway router port ``Gateway_Chassis``.

    NOTE: in future developments, the router port ``Gateway_Chassis`` will
    be replaced with a ``HA_Chassis_Group`` register.

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: Ia4f685077a8d72bf28f66daf21225d96f57ddef6

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/neutron/+/962662
Committed: https://opendev.org/openstack/neutron/commit/a64afcb13a3019279ae5aaa0581ef7226788ea65
Submitter: "Zuul (22348)"
Branch: master

commit a64afcb13a3019279ae5aaa0581ef7226788ea65
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Oct 1 10:27:55 2025 +0000

    [OVN] ``DelLSwitchPortCommand`` also deletes external ports HCG

    The ``DelLSwitchPortCommand`` now removes the external ports
    ``HA_Chassis_Group`` associated registers. It is not needed to handle
    it outside the deletion command.

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: I1e7b8a1df23c6dab2a8de604f18063fbcf6aeef7

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/964213

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/964381

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/964213
Committed: https://opendev.org/openstack/neutron/commit/2ed024bb6feaeb8e2ec95efee2cbea1cb2c44da5
Submitter: "Zuul (22348)"
Branch: master

commit 2ed024bb6feaeb8e2ec95efee2cbea1cb2c44da5
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Oct 16 07:08:44 2025 +0000

    [OVN] Add a post fork initialization method in OVN L3

    This is the base implementation of a post fork initialization, happening
    after the initialization of the "process" resource. This event happens
    after the WSGI workers are already setup.

    Related-Bug: #2125553
    Signed-off-by: Rodolfo Alonso Hernandez <email address hidden>
    Change-Id: If708b969d86940dbec9956c58a4b22271aa9a198

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.