check vPC pair order and map the expected order dynamically#631
Open
ccoueffe wants to merge 1 commit intoCiscoDevNet:developfrom
Open
check vPC pair order and map the expected order dynamically#631ccoueffe wants to merge 1 commit intoCiscoDevNet:developfrom
ccoueffe wants to merge 1 commit intoCiscoDevNet:developfrom
Conversation
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.
When you reverse the order of switches in the playbook configuration and then update interface descriptions (or other properties), the interfaces end up being configured on the opposite vPC member than intended.
The vpc_pair_sn format returned by NDFC is FIXED and ORDERED based on how the vPC pair is configured in NDFC (typically ordered by vPC domain priority, role, or alphabetically by serial number). The format is always PEER1_SERIAL~PEER2_SERIAL.
Example Scenario:
From the test results above:
Initial Configuration:
When You Reverse the Order:
The module does NOT verify which switch in your switch: [] list corresponds to PEER1 vs PEER2 according to NDFC's vpc_pair_sn ordering.
Result: When you change the switch order in your playbook, you're essentially swapping which interfaces you think are peer1_members vs peer2_members, but NDFC's PEER1/PEER2 assignment remains fixed to the serial number order.
Solution:
Implement Dynamic Peer Mapping. In function,
dcnm_intf_get_vpc_payloadwe detect members an assign values based on SN.Playbook
To reproduce issue, create vPC, then update vPC by changing the order. Finally configure vPC interface asymmetric or with description to see the issue.