[Chassis][LAG_ID] Address the same lagid been used in two different LCs issue#3303
Merged
prsunny merged 3 commits intosonic-net:masterfrom Nov 27, 2024
Merged
Conversation
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.
What I did
Create SYSTEM_LAG_IDS_FREE_LIST for assign lagId for all portchannel creation.
a) If Portchannel is created with a valid plagid
* check if plagid is in free list, use plagid and remove it from SYSTEM_LAG_IDS_FREE_LIST. Add this lagid to the SYSTEM_LAG_ID_SET for debug info
* If plagid is not in the FREE_LIST, lpop and use the first lagid from the SYSTEM_LAG_IDS_FREE_LIST. Add this lagid to the SYSTEM_LAG_ID_SET for debug info
b) If Portchannel is created with invalid plagid or without any lagid
This PR works with the following 2 PRs:
sonic-net/sonic-platform-daemons#542
sonic-net/sonic-buildimage#20369
Based on the dependency, the below order to merge these 3 PRs can help to avoid breaking the image run:
First: PR sonic-net/sonic-buildimage#20369
second: PR #3303 (This PR)
Third: PR sonic-net/sonic-platform-daemons#542
Why I did it
To address the issue of the same lagid could be used by two Portchannels in two different linecards. This issue occurs when reboot many Linecards together with 20 seconds delay in each LC reboot.
How I verified it
Details if related