fix: populate per-network HCG for vrouters after 2026.1 upgrade#2073
Merged
Conversation
…upgrade
After upgrading to neutron 28 (2026.1), attaching a subnet to a router whose
external gateway is on a vxlan-type network leaves the per-network unified
HA_Chassis_Group (neutron-<network_id>) empty. External (baremetal) ports with
OVN LSP type=external on that network reference this HCG; with it empty, no
chassis owns them and ARP/routing breaks for all baremetal nodes on the network.
Root cause: for a vxlan-type external gateway neutron pins the Logical_Router to
one chassis via options:chassis and creates a per-router HCG
(neutron-<router_id>) carrying that chassis, but never sets ha_chassis_group on
the gateway LRP. neutron's link_network_ha_chassis_group (called on internal LRP
creation) bails at its `if not gw_lrps[0].ha_chassis_group: return` guard, so
it never copies the chassis into neutron-<network_id>.
Fix: subscribe to ROUTER_INTERFACE/AFTER_CREATE at PRIORITY_DEFAULT+1000 (after
OVN's handler has created the LRP) with a new handler
link_vxlan_network_ha_chassis_group. The handler:
1. Detects a vxlan-type gateway by checking that the per-router HCG
(neutron-<router_id>) exists and has non-empty ha_chassis; VLAN/FLAT gateways
have no router HCG and continue to be handled by neutron unchanged.
2. Calls ovn_utils.sync_ha_chassis_group_network_unified to populate the
per-network HCG (neutron-<network_id>) from the router HCG chassis — this is
what fixes external/baremetal ports that already reference it.
3. Anchors the internal router-interface LRP (lrp-<port_id>) to the same unified
network HCG so the router port is also correctly owned.
Both operations run in a single OVN NB transaction. The create_port_postcommit
hook is unaffected — the internal LRP does not exist at that point (it is
created later, on the same AFTER_CREATE event OVN processes first).
49aa5e6 to
71e7448
Compare
nicholaskuechler
approved these changes
Jun 16, 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.
After upgrading to neutron 28 (2026.1), attaching a subnet to a router whose external gateway is on a vxlan-type network leaves the per-network unified
HA_Chassis_Group (neutron-<network_id>)empty. External (baremetal) ports with OVN LSPtype=externalon that network reference this HCG; with it empty, no chassis owns them and ARP/routing breaks for all baremetal nodes on the network.Root cause: for a vxlan-type external gateway neutron pins the Logical_Router to one chassis via
options:chassisand creates a per-router HCG (neutron-<router_id>) carrying that chassis, but never sets ha_chassis_group on the gateway LRP. neutron'slink_network_ha_chassis_group(called on internal LRP creation) bails at itsif not gw_lrps[0].ha_chassis_group: returnguard, so it never copies the chassis intoneutron-<network_id>.Fix: subscribe to
ROUTER_INTERFACE/AFTER_CREATEatPRIORITY_DEFAULT+1000(after OVN's handler has created the LRP) with a new handlerlink_vxlan_network_ha_chassis_group.The handler:
neutron-<router_id>) exists and has non-emptyha_chassis; VLAN/FLAT type gateways have no router HCG and continue to be handled by neutron unchanged, even though we are not using them.ovn_utils.sync_ha_chassis_group_network_unifiedto populate the per-network HCG (neutron-<network_id>) from the router HCG chassis — this is what fixes external/baremetal ports that already reference it.lrp-<port_id>) to the same unified network HCG so the router port is also correctly owned.Both operations run in a single OVN NB transaction. The
create_port_postcommithook is unaffected — the internal LRP does not exist at that point (it is created later, on the sameAFTER_CREATEevent OVN processes first).