fix(neutron): derive vxlan gateway chassis from global HA_Chassis table#2082
Draft
skrobul wants to merge 1 commit into
Draft
fix(neutron): derive vxlan gateway chassis from global HA_Chassis table#2082skrobul wants to merge 1 commit into
skrobul wants to merge 1 commit into
Conversation
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.
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.
The
previous link_vxlan_network_ha_chassis_groupimplementation sourced the gateway chassis from the per-routerHA_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 samechassis_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.