Skip to content

Multi-asic support for snmp_queue_counters test#13637

Merged
arlakshm merged 4 commits intosonic-net:masterfrom
sanjair-git:snmp-multiasic
Sep 11, 2024
Merged

Multi-asic support for snmp_queue_counters test#13637
arlakshm merged 4 commits intosonic-net:masterfrom
sanjair-git:snmp-multiasic

Conversation

@sanjair-git
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # (issue)

  • Added multi-asic support for the test 'test_snmp_queue_counters' under snmp

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?

  • Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.

How did you do it?

  • Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.

How did you verify/test it?

  • Ran the above-mentioned test case on a T2 chassis and verified.

Any platform specific information?

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

Documentation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of getting the configuration only of asic0 always, should we run the test for randomly selected one asic_index using enum_rand_one_asic_index

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Modified the test to select random asic_index based on enum_rand_one_asic_index. Please check.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

def load_new_cfg(duthost, data):
duthost.copy(content=json.dumps(data, indent=4), dest=CFG_DB_PATH) -- This is only copying to /etc/sonic/config_db.json file, whereas the configuration change should be applied to the asic namespace config_db
config_reload(duthost, config_source='config_db', safe_reload=True)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Modified the test to do configuration change based on specific asic namespace in case of multi-asic. Please check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does the test always expect to have queue configuration for Ethernet0 and delete that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ethernet0 was chosen as a random arbitrary port when this test was added initially by Aryeh. Similarly, the current changes for multi-asic, Ethernet0 is being chosen for asic0 and Ethernet144 is being chosen for asic1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we find the asic interface dynamically?
Not all HwSKU might have Ethernet144, for example the multi-asic VS does not have Ethernet144 interface https://github.com/sonic-net/sonic-buildimage/blob/master/device/virtual/x86_64-kvm_x86_64_4_asic-r0/msft_four_asic_vs/1/port_config.ini

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added code to select interface dynamically per asic on the dut. Please take a look. Tested the changes on T2 multi-asic dut and it works fine.

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can this test be added to multi-asic VS test file so that it run on multi-asic VS testbed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added this test to 'multi-asic-t1-lag' section.

@sanjair-git
Copy link
Copy Markdown
Contributor Author

Ran the above test on multi-asic T2 chassis with all the above changes. Results attached.
image

arlakshm
arlakshm previously approved these changes Sep 3, 2024
@arlakshm
Copy link
Copy Markdown
Contributor

arlakshm commented Sep 3, 2024

@SuvarnaMeenakshi, can you sign-off on this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is currently getting skipped in the PR checker for multi-asic VS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems like this is broken for multi-aisc and is being skipped. #14007

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

seems like this is broken for multi-aisc and is being skipped. #14007

Yes, we got the same error as mentioned in #14007 once this test case was added to T2. This PR will fix this issue.

Copy link
Copy Markdown
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

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

lgtm

@arlakshm arlakshm merged commit b772899 into sonic-net:master Sep 11, 2024
hdwhdw pushed a commit to hdwhdw/sonic-mgmt that referenced this pull request Sep 20, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
@rajendrat
Copy link
Copy Markdown
Contributor

viz @kevinwangsk . Please merge this to 202405 branch.

vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 29, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #15220

@StormLiangMS
Copy link
Copy Markdown
Collaborator

hi @sanjair-git could you help to take a look on the cherry pick PR, which has a PR test failure.

@sanjair-git
Copy link
Copy Markdown
Contributor Author

hi @sanjair-git could you help to take a look on the cherry pick PR, which has a PR test failure.

Sure @StormLiangMS, I will take a look.

sanjair-git added a commit to sanjair-git/sonic-mgmt that referenced this pull request Nov 26, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
sanjair-git added a commit to sanjair-git/sonic-mgmt that referenced this pull request Nov 26, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
sanjair-git added a commit to sanjair-git/sonic-mgmt that referenced this pull request Nov 27, 2024
Approach
What is the motivation for this PR?
Currently, 'test_snmp_queue_counters' test doesn't have multi-asic support and the test is failing for multi-asic chassis due to the lack of support.
How did you do it?
Added multi-asic support for test 'test_snmp_queue_counters' and made sure the current test logic is not affected.
How did you verify/test it?
Ran the above-mentioned test case on a T2 chassis and verified.
@sanjair-git
Copy link
Copy Markdown
Contributor Author

hi @sanjair-git could you help to take a look on the cherry pick PR, which has a PR test failure.

Hi @StormLiangMS, for 202405 branch, the changes with the fix have been merged as part of #15735. Taken care.

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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants