[1/n] [sync-switch] build bootstore bgp peers from already-loaded port settings#10642
Open
sunshowers wants to merge 2 commits into
Conversation
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
This was referenced Jun 19, 2026
Open
[9/n] [sync-switch] bail on an incomplete bootstore config instead of silently dropping items
#10650
Open
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.
Previously, the
sync_switch_configurationtask built the bootstoreRackNetworkConfig's BGP peers by issuing, for every port:bgp_peer_configsquery; and,But all of that data is already present in the
SwitchPortSettingsCombinedResultthe task fetched for the port, and is in fact loaded transactionally as part of that. Switch to using that viainfo.bgp_peersinstead.(Previously, we also hardcoded the interface as
phy0, so a peer on any other link silently got empty communities and no-filtering policies pushed to the bootstore. As a natural consequence, this PR fixes that.)This drastically simplifies the Nexus-side fix I had in mind for #10640, so I'd like to get this in as a preliminary fix.
Note that the mgd-apply path has the same redundant reads but (a) already uses the correct interface, (b) doesn't interact with #10640, and (c) is currently undergoing churn, so I left it alone for now.
How did we get here?
As part of fixing this I tried digging into the history of these redundant reads.
phy0as the interface name. This was a workaround, though not a proper fix since it didn't use the real interface name.This PR effectively closes the loop by using the correctly-fetched data. (But it doesn't resolve #3062, breakout support, fully yet.)
The root cause of the mixup is the lack of newtypes around the port and interface names (they're both
Names). In the future, we should introduce newtype wrappers so they can't be confused like this. But I've deferred that work for now.