sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

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

Open mlok-nokia opened this issue 1 year ago • 2 comments

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: 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

mlok-nokia avatar Sep 28 '24 02:09 mlok-nokia

can you update the UT as well.

arlakshm avatar Sep 30 '24 18:09 arlakshm

can you update the UT as well.

UT has been updated.

mlok-nokia avatar Oct 02 '24 16:10 mlok-nokia

/Azp Azure.sonic-swss

arlakshm avatar Nov 13 '24 21:11 arlakshm

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.

azure-pipelines[bot] avatar Nov 13 '24 21:11 azure-pipelines[bot]

@mlok-nokia , branch is out-of-date

rlhui avatar Nov 22 '24 03:11 rlhui

@mlok-nokia , branch is out-of-date

Fixed, Thanks

mlok-nokia avatar Nov 22 '24 15:11 mlok-nokia

@arlakshm @judyjoseph PR has been update. Please merge it.

mlok-nokia avatar Nov 25 '24 02:11 mlok-nokia

@prsunny please help merge this PR

arlakshm avatar Nov 25 '24 03:11 arlakshm

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-swss/pull/3404

mssonicbld avatar Nov 30 '24 18:11 mssonicbld

@arlakshm curious if we want to backport the fix to 202205?

ysmanman avatar Jan 09 '25 00:01 ysmanman