[OVN] Backport duplicate lswitch and NAT gateway_port - #342
Merged
stackhpc-zuul[bot] merged 3 commits intoSep 14, 2026
Merged
Conversation
A Logical_Switch created before persist_uuid was used has a random register UUID and is only identifiable by its "neutron-<net_id>" name, as stated in change Icc27c2b8825d7f96c9dac87dec8bbb55d493d942: "The name of the LS continues to be neutron-$UUID to match existing usage and to keep lookups by name working". Two code paths still resolve the register by UUID: * The maintenance task passes the Neutron network ID to ``get_lswitch``, that since change If59ac6a6fc59382904a6cdf0790fcd7a773b7cfe requires the Logical_Switch name. The lookup then matches only a register UUID or a name equal to that raw ID, the switch is not found and ``_fix_create_update`` takes the create branch (``_fix_delete`` is affected too). * ``AddNetworkCommand.run_idl`` probes the Logical_Switch table only by register UUID, so a pre-existing register with the same name is invisible and ``may_exist`` does not protect against it. The Logical_Switch table has no index in the OVN_Northbound schema, thus ovsdb-server accepts the resulting second register with a duplicated name. The ports created afterwards are resolved by name and land on any of the two registers; the duplicated one has no router port and no metadata port, so the instances booted on it have neither gateway nor metadata. The port deletion is resolved by name too and leaves orphan Logical_Switch_Ports behind. The maintenance resource map now retrieves the register by name and ``AddNetworkCommand`` falls back to a name lookup before inserting, restoring the duplicated name check ``LsAddCommand`` performs. This is not only an upgrade artifact: ``ovs_persist_uuid_supported`` returns False on OVS older than 3.1.5/3.2.3/3.3.1, thus a freshly deployed cloud running an older OVS also creates random UUID registers and is exposed to the same duplication. Closes-Bug: #2162974 Related-Change: If59ac6a6fc59382904a6cdf0790fcd7a773b7cfe Related-Change: Icc27c2b8825d7f96c9dac87dec8bbb55d493d942 Change-Id: I18d78af03541f627ad75308248f0186beecd16ac Signed-off-by: To Minh Hien <tominhhien97@gmail.com> (cherry picked from commit 745d9da5895c5016f67ea37c71c9fb8c44af0e1b)
priteau
previously approved these changes
Sep 10, 2026
bbezak
marked this pull request as draft
September 11, 2026 11:40
Test-only subset of openstack/neutron@f0f77d08ab, which landed on master after stable/2026.1 branched: the uuid/uuidutils imports in test_commands.py and FakeOvsdbTransaction.idl. The rest of that change is a feature and bumps ovsdbapp to 2.18.0, so it cannot be backported. Needed-By: #342 Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
bbezak
marked this pull request as ready for review
September 14, 2026 09:33
The guard for setting gateway_port on FIP NAT entries checked reside-on-redirect-chassis on the LRP, but this option is always 'true' for non-DVR setups with provider networks, even on gateway routers pinned to a chassis. This caused northd to reject the NAT rule and not generate DNAT flows, breaking FIP connectivity after ovn-controller restart. Only set gateway_port when distributed floating IPs are enabled (is_ovn_distributed_floating_ip). Without it, routers get pinned to a chassis (LR.options.chassis), making northd classify them as L3 gateway routers that reject gateway_port on NAT rules. This check is race-free unlike checking LR.options.chassis at FIP creation time, since the router may not be pinned yet. Closes-Bug: #2150866 Change-Id: I772b687fb92eb9bbcafbf401b9e70c6124f78716 Signed-off-by: Eduardo Olivares <eolivare@redhat.com> Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> (cherry picked from commit 299b0c5)
mnasiadka
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three OVN commits for 2026.1.