sonic-mgmt
sonic-mgmt copied to clipboard
Various Telemetry Test Fixes for Multi-Asic Support
Description of PR
Current telemetry test code on master does not take multi-asic into consideration. Which causes many test failures when testing against chassis with multi-asic.
The commit is to add those missing multi-asic supports Summary: Fixes # (issue) 12083
Type of change
- [X] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] Test case(new/improvement)
Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [X] 202405
Approach
What is the motivation for this PR?
Fix issue with multi-asic for telemetry do tests could pass against multi-asic chassic
How did you do it?
How did you verify/test it?
Run Telemetry tests after fix. All passed now.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation
Still there are two open issues : https://github.com/sonic-net/sonic-buildimage/issues/19591 https://github.com/sonic-net/sonic-buildimage/issues/19603
@zbud-msft any feedback on this? also tagging @abdosi
@yejianquan : can we review this,
@wumiaont could you please resolve the conflict and push again?
@auspham @zbud-msft Please review and see with this PR, whether we can enable telemetry test on Chassis
@wumiaont could you please resolve the conflict and push again?
@auspham @zbud-msft Please review and see with this PR, whether we can enable telemetry test on Chassis
Conflict resolved.
This PR does not change any logic if chassis is not multi-asic. Only add handling to handle multi-asic scenario. Also we have tested using the changes against Nokia-7250 chassis and telemetry tests all pass with 0 failure. Before the fix we saw more than 10 failures for telemetry.
The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.
Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing tests/telemetry/events/bgp_events.py
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed
flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped
To run the pre-commit checks locally, you can follow below steps:
- Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
- Ensure that the
pre-commitpackage is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
The pre-commit check detected issues in the files touched by this pull request. The pre-commit check is a mandatory check, please fix detected issues.
Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing tests/telemetry/events/bgp_events.py
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed
flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped
To run the pre-commit checks locally, you can follow below steps:
- Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt docker container.
- Ensure that the
pre-commitpackage is installed:
sudo pip install pre-commit
- Go to repository root folder
- Install the pre-commit hooks:
pre-commit install
- Use pre-commit to check staged file:
pre-commit
- Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>
/Azp run Azure.sonic-mgmt
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Hi @wumiaont, I would like to run some test plans with the changes in this PR and the PR fix I have to fix events with multi-asic listed in the issues above. Can you please update this PR to enable multi-asic, that way I can test the changes in this PR?
If test plan looks good with the change, we can go ahead and merge this PR.
Hi @wumiaont, I would like to run some test plans with the changes in this PR and the PR fix I have to fix events with multi-asic listed in the issues above. Can you please update this PR to enable multi-asic, that way I can test the changes in this PR?
Pushed new commit to enable eventd test for multi-asic. You can test your new changes to eventd to test telemetry events.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run Azure.sonic-mgmt
Commenter does not have sufficient privileges for PR 13826 in repo sonic-net/sonic-mgmt
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@zbud-msft , can you please signoff on this PR?
Hi @wumiaont I suggest that we remove all test_events.py changes from this PR as we will not be able to validate changes until im age changes are done. Can we also add test_telemetry and test_cert_rotation to multi-asic test scripts to validate these changes work fine on multi-asic?
Hi @wumiaont I suggest that we remove all test_events.py changes from this PR as we will not be able to validate changes until im age changes are done. Can we also add test_telemetry and test_cert_rotation to multi-asic test scripts to validate these changes work fine on multi-asic?
The changes here are mostly handle the events issue with multi-asic. I can create another PR to handle the telemetry and certificate part for multi-asic support. Will test and update here soon.
Hi @wumiaont I suggest that we remove all test_events.py changes from this PR as we will not be able to validate changes until im age changes are done. Can we also add test_telemetry and test_cert_rotation to multi-asic test scripts to validate these changes work fine on multi-asic?
The changes here are mostly handle the events issue with multi-asic. I can create another PR to handle the telemetry and certificate part for multi-asic support. Will test and update here soon.
Created PR https://github.com/sonic-net/sonic-mgmt/pull/14982 for multi-asic support for telemetry tests. Please review that. Thanks
this PR had both eventd and telemetry changes for multi-asic. But eventd multi-asic is not support on image for multi-asic. so closing this one PR for telemetry: https://github.com/sonic-net/sonic-mgmt/pull/14982