Multi_asic support for Counterpoll command #20875
Multi_asic support for Counterpoll command #20875ansrajpu-git wants to merge 10 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arlakshm @vmittal-msft , Kindly review this PR. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@vmittal-msft, Please review. Please note the build failure is happening because this PR has a dependency on PR# sonic-net/sonic-utilities#4012 which is still not merged. |
|
@liamkearney-msft : please help review. |
|
@ansrajpu-git This PR is required for sonic-utilities submodule update, as multi-ASIC T1 KVM tests are failing. Please help with getting this ready for merge. @vmittal-msft FYI. |
|
@ansrajpu-git can you please share test results ? Also, is this only applicable for chassis or pizza box as well ? If generic changes, have we tested on pizza box ? |
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
@vmittal-msft , Below is the snapshot of chassis results |
| def disable_counterpoll(duthost, counter_type_list, asic_id=None): | ||
| for counterpoll_type in counter_type_list: | ||
| duthost.command(CounterpollConstants.COUNTERPOLL_DISABLE.format(counterpoll_type)) | ||
| if duthost.is_multi_asic: |
There was a problem hiding this comment.
just a thought - if asic_id == None but the duthost is multi_asic, should we iterate through the asics within this function?
as in, for multi asic duts, if you specify the asic we only operate on that asic, but if you dont it will operate on all the asics?
That way the caller of theses functions wont need to iterate / check for multi asic before calling, its all handled by the counterpoll helper functions.
There was a problem hiding this comment.
@liamkearney-msft , thanks for your review. The 'asic_id' is misleading, so made appropriate change as its 'asic' instance. As per my understanding multi_asic dut with single asic instance will have not None value & asic_index as '0'. Also, I kept the multi_asic check in caller function & removed from the called, to maintain a homogeneity in code.For ex., some function like -'verify_counterpoll_status' are nested.
| for counterpoll_type in counter_type_list: | ||
| duthost.command(CounterpollConstants.COUNTERPOLL_DISABLE.format(counterpoll_type)) | ||
| if duthost.is_multi_asic: | ||
| asic_index = " -n asic{}".format(asic_id.asic_index) |
There was a problem hiding this comment.
This needs an additional check to see if the image this test is running on supports the -n option. Otherwise, if this test case runs on an image without the sonic-utilities PR present (which is the current master branch of buildimage), then this command will fail, and all tests running this command will fail.
saiarcot895
left a comment
There was a problem hiding this comment.
Please add support for checking if the image being used supports -n or not.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
@saiarcot895 , this PR is dependent on sonic-utility PR-sonic-net/sonic-utilities#4012, which is already merged in master. |
|
This PR will be tested against the last good build from sonic-buildimage master branch (which doesn't support the There is a deadlock there. |
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
Signed-off-by: ansrajpu <anshu.rajput@nokia.com>
e14a30f to
094886d
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
This PR is depended on the new sonic-utility PR #sonic-net/sonic-utilities#4152. |


Description of PR
Summary:
The existing "counterpoll" CLI command does not have support for multi asic.
This PR is raised to accommodate all changes required to support sonic-mgmt test w.r.t the sonic-utilities PR # sonic-net/sonic-utilities#4012 which was raised to enhance the feature for multi-asic
Fixes # (issue)
Type of change
Back port request
Approach
Verified the CLI used across all test suites and made changes accordingly
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Executed related test and verified the results.
Any platform specific information?
Mutli_asic
Supported testbed topology if it's a new test case?
Documentation