Skip to content

[Chassis][LAG_ID] Address the same lagid been used in two different LCs issue#3303

Merged
prsunny merged 3 commits intosonic-net:masterfrom
mlok-nokia:lag_id_conflict_issue
Nov 27, 2024
Merged

[Chassis][LAG_ID] Address the same lagid been used in two different LCs issue#3303
prsunny merged 3 commits intosonic-net:masterfrom
mlok-nokia:lag_id_conflict_issue

Conversation

@mlok-nokia
Copy link
Copy Markdown
Contributor

@mlok-nokia mlok-nokia commented Sep 28, 2024

What I did
Create SYSTEM_LAG_IDS_FREE_LIST for assign lagId for all portchannel creation.

  1. 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
    • 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
  2. Portchannel delection
    • Append the lagid to the end of SYSTEM_LAG_IDS_FREE_LIST. Also remove it from SYSTEM_LAG_ID_SET.

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants