Skip to content

fix: fix port does not exist error test_bgp_queue#15949

Merged
yejianquan merged 1 commit intosonic-net:masterfrom
auspham:austinpham/30457143-resolve-bgp-test-bgp-queue
Dec 11, 2024
Merged

fix: fix port does not exist error test_bgp_queue#15949
yejianquan merged 1 commit intosonic-net:masterfrom
auspham:austinpham/30457143-resolve-bgp-test-bgp-queue

Conversation

@auspham
Copy link
Contributor

@auspham auspham commented Dec 9, 2024

Description of PR

Summary:
Fixes # (issue) 30457143

Currently this is using the old method of capturing queue counters:

sudo ip netns exec asic1 show queue counters Ethernet128

This will throw an issue with some testbed and says Ethernet128 does not exists. (haven't had chance to confirm why)

However since we have new support for -n sonic-net/sonic-utilities#2439 we should be using this instead

Tested by running manual commands

admin@str3-8800-lc4-1:~$ sudo ip netns exec asic1 show queue counters Ethernet128
Port doesn't exist! Ethernet128
admin@str3-8800-lc4-1:~$ show queue counters Ethernet128 -n asic1
For namespace asic1:
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet128    UC0               0                0            0             0
...

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?

How did you do it?

Update the test to use new APIs that support -n

How did you verify/test it?

Manually run, needs to verify with available testbed.

Any platform specific information?

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

Documentation

@auspham auspham requested a review from StormLiangMS as a code owner December 9, 2024 03:23
@auspham auspham requested a review from yejianquan December 9, 2024 03:23
@auspham auspham force-pushed the austinpham/30457143-resolve-bgp-test-bgp-queue branch from 5d53fb8 to 34c91ed Compare December 9, 2024 06:47
@yejianquan yejianquan marked this pull request as draft December 9, 2024 07:08
@auspham auspham force-pushed the austinpham/30457143-resolve-bgp-test-bgp-queue branch from 34c91ed to 32aab07 Compare December 10, 2024 09:03
@auspham auspham force-pushed the austinpham/30457143-resolve-bgp-test-bgp-queue branch from 32aab07 to 64d8cff Compare December 10, 2024 09:04
@auspham
Copy link
Contributor Author

auspham commented Dec 10, 2024

Hi @vmittal-msft @arista-hpandya, could you please help advise if this is an acceptable solution for this problem? Thanks

@yejianquan
Copy link
Collaborator

Hi @auspham Discussed with Abhishek, it's ok to use the new way only, nowhere is using the old way

@arista-hpandya
Copy link
Contributor

@auspham I have left a detailed comment in sonic-net/sonic-utilities#3554. Hopefully that clarifies it further!

@auspham auspham marked this pull request as ready for review December 10, 2024 23:19
return self.sonichost.command(cmdstr)

cmdstr = "sudo ip netns exec {} {}".format(self.namespace, cmdstr)
if new_format:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this change will go to 202405 branch
Could you please confirm the new format works well on single ASIC devices?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yejianquan passed single-asic 202405 image

@auspham
Copy link
Contributor Author

auspham commented Dec 11, 2024

Verified in both single and multi-asic with newest 202405 build image

Single-asic:

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- generated xml file: /var/src/sonic-mgmt_vms12-t0-7060x6-2_672af7fbc5c63d1d662894a7/tests/logs/bgp/test_bgp_queue.xml -
================== 1 passed, 4 warnings in 322.81s (0:05:22) ===================

multi-asic

sonic-mgmt_vms69-t2-8800-1_66b4a53de4614bccc2e74f8c/tests/logs/bgp/test_bgp_queue.xml -
================== 9 passed, 1 warning in 2589.36s (0:43:09) ===================

Copy link
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit 4e48542 into sonic-net:master Dec 11, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Dec 11, 2024
Description of PR
Summary:
Fixes # (issue) 30457143

Currently this is using the old method of capturing queue counters:

sudo ip netns exec asic1 show queue counters Ethernet128
This will throw an issue with some testbed and says Ethernet128 does not exists. (haven't had chance to confirm why)

However since we have new support for -n sonic-net/sonic-utilities#2439 we should be using this instead

Tested by running manual commands

admin@str3-8800-lc4-1:~$ sudo ip netns exec asic1 show queue counters Ethernet128
Port doesn't exist! Ethernet128
admin@str3-8800-lc4-1:~$ show queue counters Ethernet128 -n asic1
For namespace asic1:
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet128    UC0               0                0            0             0
...
Type of change

Approach
What is the motivation for this PR?
How did you do it?
Update the test to use new APIs that support -n

How did you verify/test it?
Manually run, needs to verify with available testbed.

Signed-off-by: Austin Pham <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #16008

mssonicbld pushed a commit that referenced this pull request Dec 11, 2024
Description of PR
Summary:
Fixes # (issue) 30457143

Currently this is using the old method of capturing queue counters:

sudo ip netns exec asic1 show queue counters Ethernet128
This will throw an issue with some testbed and says Ethernet128 does not exists. (haven't had chance to confirm why)

However since we have new support for -n sonic-net/sonic-utilities#2439 we should be using this instead

Tested by running manual commands

admin@str3-8800-lc4-1:~$ sudo ip netns exec asic1 show queue counters Ethernet128
Port doesn't exist! Ethernet128
admin@str3-8800-lc4-1:~$ show queue counters Ethernet128 -n asic1
For namespace asic1:
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet128    UC0               0                0            0             0
...
Type of change

Approach
What is the motivation for this PR?
How did you do it?
Update the test to use new APIs that support -n

How did you verify/test it?
Manually run, needs to verify with available testbed.

Signed-off-by: Austin Pham <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 2, 2025
Description of PR
Summary:
Fixes # (issue) 30457143

Currently this is using the old method of capturing queue counters:

sudo ip netns exec asic1 show queue counters Ethernet128
This will throw an issue with some testbed and says Ethernet128 does not exists. (haven't had chance to confirm why)

However since we have new support for -n sonic-net/sonic-utilities#2439 we should be using this instead

Tested by running manual commands

admin@str3-8800-lc4-1:~$ sudo ip netns exec asic1 show queue counters Ethernet128
Port doesn't exist! Ethernet128
admin@str3-8800-lc4-1:~$ show queue counters Ethernet128 -n asic1
For namespace asic1:
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet128    UC0               0                0            0             0
...
Type of change

Approach
What is the motivation for this PR?
How did you do it?
Update the test to use new APIs that support -n

How did you verify/test it?
Manually run, needs to verify with available testbed.

Signed-off-by: Austin Pham <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #16286

mssonicbld pushed a commit that referenced this pull request Jan 2, 2025
Description of PR
Summary:
Fixes # (issue) 30457143

Currently this is using the old method of capturing queue counters:

sudo ip netns exec asic1 show queue counters Ethernet128
This will throw an issue with some testbed and says Ethernet128 does not exists. (haven't had chance to confirm why)

However since we have new support for -n sonic-net/sonic-utilities#2439 we should be using this instead

Tested by running manual commands

admin@str3-8800-lc4-1:~$ sudo ip netns exec asic1 show queue counters Ethernet128
Port doesn't exist! Ethernet128
admin@str3-8800-lc4-1:~$ show queue counters Ethernet128 -n asic1
For namespace asic1:
       Port    TxQ    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
-----------  -----  --------------  ---------------  -----------  ------------
Ethernet128    UC0               0                0            0             0
...
Type of change

Approach
What is the motivation for this PR?
How did you do it?
Update the test to use new APIs that support -n

How did you verify/test it?
Manually run, needs to verify with available testbed.

Signed-off-by: Austin Pham <[email protected]>
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.

5 participants