-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test_snmp_cpu]Use timeout configuration in all SNMP request, increase SNMP request timeout to 20 #16290
[test_snmp_cpu]Use timeout configuration in all SNMP request, increase SNMP request timeout to 20 #16290
Conversation
…e chassis SNMP request timeout to 20
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Test on chassis: |
Test on pizza box: snmp/test_snmp_cpu.py::test_snmp_cpu[x-msn4600c-x PASSED --------------------------------------------------------------------------------------------- generated xml file: /var/src/sonic-mgmt-int/tests/logs/tr.xml --------------------------------------------------------------------------------------------- |
tests/snmp/test_snmp_cpu.py
Outdated
@@ -51,9 +51,14 @@ def test_snmp_cpu(duthosts, enum_rand_one_per_hwsku_hostname, localhost, creds_a | |||
# Wait for load to reflect in SNMP | |||
time.sleep(20) | |||
|
|||
# Give chassis longer timeout because it has more interfaces. | |||
is_chassis = duthost.get_facts().get("modular_chassis") | |||
snmp_timeout = 20 if is_chassis else 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all hwsku are using the same snmp/agentx timeout config, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @qiluo-msft ,
Yes, with sonic-net/sonic-buildimage#21316, all hwsku will share the 20s timeout.
But previously the other hwsku are not using the long timeout(20s) setting with SNMP tests.
That's why I limit the scope to chassis only incase hiding something on other platforms.
I'm ok if you suggest to leverage 20 to all hwskus, please let me know your suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test should use the normal timeout of normal clients in the industry. Should you add "retry" instead of "timeout"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @qiluo-msft , updated, make the 20s the default value and add comments.
For the timeout setting in the all the snmp requests, I think they should use the timeout setting of the snmp_fact.py by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @qiluo-msft , the 'retry' in snmp is actually the logic of snmp pdus,
Here the timeout is the timeout for snmp walker requests.
Per my observation, take interface snmp walker requests as example, 1 walker request has 1600 snmp pdu requests behind.
And in our production, the timeout is greater than 20s.
So with 20s timeout, we can cover the scenario well.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…e SNMP request timeout to 20 (sonic-net#16290) Description of PR Summary: Fixes #30112399 Approach What is the motivation for this PR? Fix test_snmp_cpu failures on Cisco chassis. How did you do it? Incorporate timeout setting in all SNMP commands Increase chassis SNMP request timeout to 20s How did you verify/test it? Run on Cisco chassis and it stably pass. co-authorized by: jianquanye@microsoft.com
Cherry-pick PR to 202411: #16518 |
…e SNMP request timeout to 20 (sonic-net#16290) Description of PR Summary: Fixes #30112399 Approach What is the motivation for this PR? Fix test_snmp_cpu failures on Cisco chassis. How did you do it? Incorporate timeout setting in all SNMP commands Increase chassis SNMP request timeout to 20s How did you verify/test it? Run on Cisco chassis and it stably pass. co-authorized by: jianquanye@microsoft.com
Cherry-pick PR to 202405: #16519 |
…e SNMP request timeout to 20 (#16290) Description of PR Summary: Fixes #30112399 Approach What is the motivation for this PR? Fix test_snmp_cpu failures on Cisco chassis. How did you do it? Incorporate timeout setting in all SNMP commands Increase chassis SNMP request timeout to 20s How did you verify/test it? Run on Cisco chassis and it stably pass. co-authorized by: jianquanye@microsoft.com
…e SNMP request timeout to 20 (#16290) Description of PR Summary: Fixes #30112399 Approach What is the motivation for this PR? Fix test_snmp_cpu failures on Cisco chassis. How did you do it? Incorporate timeout setting in all SNMP commands Increase chassis SNMP request timeout to 20s How did you verify/test it? Run on Cisco chassis and it stably pass. co-authorized by: jianquanye@microsoft.com
Description of PR
Summary:
Fixes #30112399
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix test_snmp_cpu failures on Cisco chassis.
How did you do it?
How did you verify/test it?
Run on Cisco chassis and it stably pass.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation