[warm-reboot] Match virtual routers by VLAN interfaces during APPLY_VIEW - #2007
Open
YairRaviv wants to merge 1 commit into
Open
[warm-reboot] Match virtual routers by VLAN interfaces during APPLY_VIEW#2007YairRaviv wants to merge 1 commit into
YairRaviv wants to merge 1 commit into
Conversation
Signed-off-by: Yair Raviv <yraviv@nvidia.com>
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
nazariig
requested review from
abelamit,
dgsudharsan,
keboliu,
liat-grozovik,
moshemos,
oleksandrivantsiv and
volodymyrsamotiy
July 30, 2026 09:57
nazariig
approved these changes
Jul 30, 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.
Description of PR
Summary:
During warm-reboot APPLY_VIEW, multiple virtual routers may have identical SAI attributes and dependency counts. The existing matching logic can therefore select a virtual-router candidate randomly.
An incorrect match makes unchanged VLAN RIFs appear different and generates unnecessary create/remove operations. Duplicate RIF creation may fail with SAI_STATUS_ITEM_ALREADY_EXISTS, causing syncd to enter shutdown-wait mode and orchagent to exit.
This PR makes virtual-router matching deterministic by using the VLAN IDs of their attached VLAN router interfaces.
Fixes # (Bug: [warm-reboot] APPLY_VIEW may randomly mismatch identical virtual routers and recreate existing VLAN RIFs)
Type of change
Approach
What is the motivation for this PR?
Prevent random virtual-router matching during warm-reboot reconciliation and avoid unnecessary VLAN RIF recreation.
Work item tracking
How did you do it?
Added virtual-router-specific matching to BestCandidateFinder.
For each virtual router, syncd collects the VLAN IDs of its attached VLAN-type router interfaces. A temporary virtual router is matched with the current virtual router that has the same VLAN ID set.
The match is used only when it is unique. Otherwise, syncd falls back to the existing matching logic.
How did you verify/test it?
Unit test:
Added a unit test with two current and two temporary virtual routers that have:
The test verifies that the virtual routers are matched using their VLAN interfaces rather than random selection.
Manual test:
Any platform specific information?
Documentation