-
Notifications
You must be signed in to change notification settings - Fork 661
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
Fix multi-asic behaviour for watermarkstat #3060
Fix multi-asic behaviour for watermarkstat #3060
Conversation
f3adcf4
to
8221148
Compare
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.
can you please provide proof that this change also works on single asic? I think there is UT that has run to prove
self.execute(['watermarkstat', '-t', 'headroom_pool', '-n', 'asic1'], | ||
expected_result=show_hdrm_pool_wm_output) | ||
|
||
def test_show_invalid_asic_masic(self): |
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.
@bktsim-arista Few things -
- If no namespace specified, Will it show for all namespaces? if we specify, will it show for only that namespace ?
- Is this verified to be working fine on pizza box as well as chassis?
@bktsim-arista Can you please upate sonic-net/sonic-buildimage#15148 on which PR is handling which command for easy tracking ? |
8221148
to
bafefd4
Compare
@alpeshspatel : please help review |
…-watermark related commands. Previously, the following commands were not behaving correctly on multi-asic devices, as the '-n' namespace option was not available, and correct namespaces were not traversed on multi-asic devices. * show buffer_pool watermark/persistent-watermark * show headroom-pool watermark/persistent-watermark * show priority-group persistent-watermark/watermark * show queue persistent-watermark/watermark This change fixes multi-asic behaviour of CLI commands that rely on watermarkstat, as listed above.
bafefd4
to
1ec4974
Compare
- Added multi-asic support to clear functionality - Introduced a wrapper class for multi-asic - Added tests for multi-asic - Modified mock counters_db for tests - Replaced argparse with click - Fixed pre-commit formatting errors
1ec4974
to
a8860ef
Compare
The test failures are due to change in mock DB, will push a fix addressing it soon. |
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.
snapshot result :LGTM
@bktsim-arista Please raise another PR to 202405 to address cherry-pick conflict. |
You can ping me or @kenneth-arista for this PR going ahead. Because the change touches pgdropstat, can we please get #3058 cherry-picked to 202405 first, this change has an overlap with the test files introduced in #3058 |
What I did
Added multi-asic support to watermarkstat, fixing watermark/persistent-watermark related commands. Previously, the following commands were not behaving correctly on multi-asic devices, as the '-n' namespace option was not available, and correct namespaces were not traversed on multi-asic devices.
This change fixes multi-asic behaviour of CLI commands that rely on watermarkstat as listed above.
This is a part of the set of changes being pushed for sonic-net/sonic-buildimage#15148
How I did it
Added namespace option
-n
and used multi_asic library to implement multi_asic behaviour. Added relevant unit tests to ensure functionality.How to verify it
Run unit tests, or the commands as listed above.