Skip to content

fix(neutron): derive vxlan gateway chassis from global HA_Chassis table#2082

Draft
skrobul wants to merge 1 commit into
mainfrom
ovn-ha-improvements
Draft

fix(neutron): derive vxlan gateway chassis from global HA_Chassis table#2082
skrobul wants to merge 1 commit into
mainfrom
ovn-ha-improvements

Conversation

@skrobul

@skrobul skrobul commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

The previous link_vxlan_network_ha_chassis_group implementation sourced the gateway chassis from the per-router HA_Chassis_Group (neutron-<router_id>), which only exists after the external gateway port is attached to the router. Attaching an internal port before the gateway was wired up left the per-network HCG empty and baremetal ports broken.

Replace the per-router HCG lookup with a scan of the HA_Chassis table. If every record shares the same chassis_name(single-gateway deployment that we currently do), that chassis is used at priority32767`. If the table is empty or contains multiple distinct names the handler logs and exits, preserving the existing safe-fallback behaviour.

Add a short-circuit guard: if the per-network HCG already carries chassis entries, return early to avoid redundant work.

The previous link_vxlan_network_ha_chassis_group implementation sourced
the gateway chassis from the per-router HA_Chassis_Group
(neutron-<router_id>), which only exists after the external gateway port
is attached to the router. Attaching an internal port before the gateway
was wired up left the per-network HCG empty and baremetal ports broken.

Replace the per-router HCG lookup with a scan of the global HA_Chassis
table. If every record shares the same chassis_name (single-gateway
deployment), that chassis is used at priority 32767. If the table is
empty or contains multiple distinct names the handler logs and exits,
preserving the existing safe-fallback behaviour.

Add a short-circuit guard: if the per-network HCG already carries
chassis entries (VLAN/FLAT networks, where neutron's own handler runs
first), return early to avoid redundant work.

Update tests: replace the per-router HCG mock with a db_list_rows mock,
add cases for an empty HA_Chassis table, multiple chassis names, and an
already-populated per-network HCG.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant