Skip to content

Add static route ASIC DB check for test_nhop_group test#14475

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
echuawu:update_nhop_script
Nov 6, 2024
Merged

Add static route ASIC DB check for test_nhop_group test#14475
bingwang-ms merged 1 commit intosonic-net:masterfrom
echuawu:update_nhop_script

Conversation

@echuawu
Copy link
Contributor

@echuawu echuawu commented Sep 9, 2024

Description of PR

Add the static route ASIC DB validation in cases of weak switch

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

For some weak CPU switch, such as Mellanox SN2700 with A0 chip type. The fixed 15 seconds is not enough to handle a bunch of BGP route add/delete and static route add/delete. So the case would failed from time to time.

How did you do it?

Add a ASIC DB check for the static route validation.

How did you verify/test it?

Run it in internal regression.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@echuawu
Copy link
Contributor Author

echuawu commented Sep 10, 2024

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu
Copy link
Contributor Author

echuawu commented Sep 11, 2024

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Collaborator

@abdosi @prsunny Can you help review?

Add the static route validation in cases of weak switch

Change-Id: I83f2a9a2318adbf901b94f82dcc39b9362d43f78
@echuawu echuawu force-pushed the update_nhop_script branch from be11417 to a352b52 Compare October 31, 2024 11:38

def validate_asic_route(duthost, route, exist=True):
logger.info(f"Checking ip route: {route}")
asic_info = duthost.shell(f'redis-cli -n 1 keys "ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY:*{route}*"',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need * here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bingwang-ms , it's based on the test result.
image

@bingwang-ms bingwang-ms merged commit 61b3ba5 into sonic-net:master Nov 6, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Nov 6, 2024
Add the static route validation in cases of weak switch

Change-Id: I83f2a9a2318adbf901b94f82dcc39b9362d43f78
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #15373

mssonicbld pushed a commit that referenced this pull request Nov 6, 2024
Add the static route validation in cases of weak switch

Change-Id: I83f2a9a2318adbf901b94f82dcc39b9362d43f78
veronica-arista pushed a commit to veronica-arista/sonic-mgmt that referenced this pull request Nov 7, 2024
Add the static route validation in cases of weak switch

Change-Id: I83f2a9a2318adbf901b94f82dcc39b9362d43f78
sreejithsreekumaran pushed a commit to sreejithsreekumaran/sonic-mgmt that referenced this pull request Nov 15, 2024
Add the static route validation in cases of weak switch

Change-Id: I83f2a9a2318adbf901b94f82dcc39b9362d43f78
yutongzhang-microsoft pushed a commit to yutongzhang-microsoft/sonic-mgmt that referenced this pull request Nov 21, 2024
Add the static route validation in cases of weak switch

Change-Id: I83f2a9a2318adbf901b94f82dcc39b9362d43f78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants