[OVN] Pin a Logical_Router to a chassis when the external network is tunnelled

Bug #2052821 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Rodolfo Alonso

Bug Description

When a gateway network (external network) is added to a router (OVN Logical_Router), a gateway port (OVN Logical_Router_Port) is created. If the router GW network is a tunnelled network, the GW LRP won't be bound to any GW chassis; the network has no physical network thus there is no correspondence with any GW physical bridge. Check [1] for more information.

In order to be able to send traffic through a GW chassis, it is needed to pin the LR to a chassis manually:
  LR:options:chassis=<GW chassis UUID>

Note: there is a proposal [3] to make this functionality a core OVN functionality, being able to assign a "HA_Chassis_Group" to a Logical Router. This LP bug wants to implement the same functionality but in the Neutron code.

[1]https://review.opendev.org/c/openstack/neutron/+/908325

References:
[2]https://bugzilla.redhat.com/show_bug.cgi?id=2259161
[3]https://issues.redhat.com/browse/FDP-365

Tags: ovn
Changed in neutron:
importance: Undecided → Medium
summary: - [OVN] Pin a Logical_Router to a chassis when external network is
+ [OVN] Pin a Logical_Router to a chassis when the external network is
tunnelled
Revision history for this message
Daniel Alvarez (dalvarezs) wrote :

Please note that by pinning a router we will lose DVR for both E/W and N/S (FIP) traffic.
This is non ideal but better than what we have today which does not work at all.

@Rodolfo, IIUC, this LP will cover two things, the functional and the HA parts:

1) Pinning the router to a particular chassis (ie. functional portion)
2) Having Neutron monitoring all chassis hosting a router and move the routers if the chassis go down (ie . HA portion)

Is this accurate?

tags: added: ovn
Changed in neutron:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
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/+/909194

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

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

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

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

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/+/910538

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

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

commit f73a2515cbf5ffecdcb0de1598c890da8d58c5cc
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Feb 16 20:50:16 2024 +0000

    [OVN] Identify the LR GW port with "external_ids:neutron:is_ext_gw"

    Since [1], any "Logical_Router_Port" has a key in "external_ids" to
    identify if it is an external gateway or not. This key is
    "neutron:is_ext_gw". This patch makes use of this key to identify
    them in the ``get_lrouter_gw_ports`` method.

    This implementation will be useful when the "Logical_Router_Port"
    would be bound to an external tunnelled networks. These ports won't
    be bound to a "Gateway_Chassis" and the previous logic in this
    method will fail.

    [1]https://review.opendev.org/c/openstack/neutron/+/907402

    Partial-Bug: #2052821
    Change-Id: Ieac603b0c7a940693a12170b453eea39dd0eaa47

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

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

commit fa3223bb9d76c6f5ba1a12dd5a17cec6852be7df
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Feb 16 19:24:28 2024 +0000

    [OVN] Remove OVN_GATEWAY_INVALID_CHASSIS artifact

    This artifact is no longer used in the "Logical_Router" registers (in
    the "options" field) to mark this "Logical_Router" as unhosted. A
    "Logical_Router" is considered as unhosted if the gateway
    "Logical_Router_Ports" have no "chassis" set.

    This artifact is also used to create a "Gateway_Chassis" register
    pointing to a inexisting invalid chassis called
    "neutron-ovn-invalid-chassis". Any "Logical_Router_Port" not bound
    to a chassis will have no value in "gateway_chassis" (NOTE1).

    NOTE1: this is valid now with the current two OVN L3 schedulers that
    use "gateway_chassis" to schedule the "Logical_Router_Port" of a
    router. In a future, we can consider using "ha_chassis_group" for
    scheduling.

    Partial-Bug: #2052821
    Related-Bug: #2019217
    Change-Id: I12717936fe2bc188545309bacb8a260981f14c88

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

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

commit b5aecfeff89d4bd5441c91f8ba2b665d9d12cfca
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Feb 23 04:41:15 2024 +0000

    [OVN] Make mandatory the router name in the LRP.external_ids

    The router name will be always defined in the "Logical_Router_Port"
    external_ids field.

    Related-Bug: #2052821
    Change-Id: Ia2f70363963dca9f035eff8d1ff0c399dc8b9239

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

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

commit 00b64d289b3340af9e838909077d58c892b76a71
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat Feb 24 04:51:47 2024 +0000

    [OVN] Create an OVN DB transaction context decorator

    This decorator allows to create a new OVN database transaction or
    use the existing one in a method. It is needed to pass the transaction
    object (if any) and the IDL (Northbound or Southbound).

    Related-Bug: #2052821
    Change-Id: I925c1d745197edd08a62ced66b275c7b1dad1d6a

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

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

commit 25a1809964f4845d98d9b3d05148b764a65c9458
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sun Feb 11 18:50:55 2024 +0000

    [OVN] "Logical_Router" pinned to chassis, OVN L3 scheduler

    Pin a "Logical_Router" to a chassis when the gateway network (external
    network) is tunnelled. When the external network is tunnelled, the
    "Logical_Router_Port" acting as gateway port is not bound to any
    chassis (the network has no physical provider network defined).

    In that case, the router is pinned to a chassis instead. A
    "HA_Chassis_Group" is created per router. The highest "HA_Chassis" of
    this group is assigned to the router. If the gateway port is deleted,
    the pinned chassis is removed from the "options" field. If the
    router is deleted, the "HA_Chassis_Group" is deleted too.

    NOTE: in the a chassis belonging to the router "HA_Chassis_Group"
    changes, the list of "HA_Chassis" will be updated in
    ``ChassisEvent.handle_ha_chassis_group_changes``. However, a
    "HA_Chassis_Group" change is handled by OVN, when assiged.

    But in this case we are using this artifact, as commented before,
    to "manually assign" (from core OVN point of view) the highest
    priority "HA_Chassis" to the router (this upcoming funcionality
    will be implemented in core OVN). A new follow-up patch will be
    pushed to provide HA functionality and update the "HA_Chassis"
    assigned to the "Logical_Router" when the chassis list changes.

    Partial-Bug: #2052821
    Change-Id: I33555fc8a8441149b683ae68f1f10548ffb662a6

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit bd31c233808a64473b1c0d3f770fb3ce8729275a
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Feb 19 11:05:15 2024 +0000

    [OVN] Provide HA functionality to "Logical_Router" chassis pinning

    When an external tunnelled network is used as gateway network in an
    OVN router, the "Logical_Router_Port" is not bound to any chassis and
    the "Logical_Router" is pinned to a gateway chassis, using the list
    provided in a "HA_Chassis_Group".

    This patch attends to any change in the "HA_Chassis" list of the
    "HA_Chassis_Group" to update the "Logical_Router" chassis assigned.
    This provides HA functionality in case that the bound chassis
    (chassis pinned) fails.

    Closes-Bug: #2052821
    Change-Id: Ia3d4271d015386fbec3c3f2276a7f62c2f8ad5dd

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/+/915558

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

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

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

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

commit c2f34e136d22df27315386b6950e7cf5e3f9e8c8
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Apr 8 22:52:42 2024 +0000

    [OVN] Optimize ``HAChassisGroupRouterEvent`` code

    This patch is addressing some comments made in the previous patch [1]
    and optimizing the code of ``HAChassisGroupRouterEvent`` class.

    Related-Bug: #2052821

    [1]https://review.opendev.org/c/openstack/neutron/+/909437

    Change-Id: Ibc4afce16e95ea7d48737c254cd11431e9994704

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

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

commit 8396d0bb6d1b75b051196747e96fe3f7cabdc18e
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Apr 8 23:11:08 2024 +0000

    [OVN] Add release note for OVN router tunnelled networks ext GW

    Related-Bug: #2052821
    Change-Id: Ie0a587808681e49d11f723ca672097f9843f5123

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.