sonic-swss
sonic-swss copied to clipboard
[Chassis][LAG_ID] Address the same lagid been used in two different LCs issue
What I did Create SYSTEM_LAG_IDS_FREE_LIST for assign lagId for all portchannel creation.
- 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
- 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: https://github.com/sonic-net/sonic-platform-daemons/pull/542 https://github.com/sonic-net/sonic-buildimage/pull/20369
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
can you update the UT as well.
can you update the UT as well.
UT has been updated.
/Azp Azure.sonic-swss
Command 'Azure.sonic-swss' is not supported by Azure Pipelines.
Supported commands
- help:
- Get descriptions, examples and documentation about supported commands
- Example: help "command_name"
- list:
- List all pipelines for this repository using a comment.
- Example: "list"
- run:
- Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
- Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
- where:
- Report back the Azure DevOps orgs that are related to this repository and org
- Example: "where"
See additional documentation.
@mlok-nokia , branch is out-of-date
@mlok-nokia , branch is out-of-date
Fixed, Thanks
@arlakshm @judyjoseph PR has been update. Please merge it.
@prsunny please help merge this PR
Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-swss/pull/3404
@arlakshm curious if we want to backport the fix to 202205?