sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

Various Telemetry Test Fixes for Multi-Asic Support

Open wumiaont opened this issue 1 year ago • 8 comments

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

wumiaont avatar Jul 25 '24 20:07 wumiaont

Still there are two open issues : https://github.com/sonic-net/sonic-buildimage/issues/19591 https://github.com/sonic-net/sonic-buildimage/issues/19603

judyjoseph avatar Jul 31 '24 17:07 judyjoseph

@zbud-msft any feedback on this? also tagging @abdosi

rlhui avatar Aug 21 '24 17:08 rlhui

@yejianquan : can we review this,

abdosi avatar Aug 21 '24 17:08 abdosi

@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

yejianquan avatar Sep 05 '24 00:09 yejianquan

@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.

wumiaont avatar Sep 05 '24 14:09 wumiaont

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.

wumiaont avatar Sep 05 '24 14:09 wumiaont

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:

  1. 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.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Sep 09 '24 18:09 mssonicbld

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:

  1. 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.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

mssonicbld avatar Sep 09 '24 19:09 mssonicbld

/Azp run Azure.sonic-mgmt

arlakshm avatar Sep 11 '24 17:09 arlakshm

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Sep 11 '24 17:09 azure-pipelines[bot]

/azp run

yejianquan avatar Sep 12 '24 02:09 yejianquan

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Sep 12 '24 02:09 azure-pipelines[bot]

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?

zbud-msft avatar Oct 01 '24 22:10 zbud-msft

If test plan looks good with the change, we can go ahead and merge this PR.

zbud-msft avatar Oct 01 '24 22:10 zbud-msft

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.

wumiaont avatar Oct 02 '24 13:10 wumiaont

/azp run

yejianquan avatar Oct 08 '24 00:10 yejianquan

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 08 '24 00:10 azure-pipelines[bot]

/azp run Azure.sonic-mgmt

wumiaont avatar Oct 08 '24 13:10 wumiaont

Commenter does not have sufficient privileges for PR 13826 in repo sonic-net/sonic-mgmt

azure-pipelines[bot] avatar Oct 08 '24 13:10 azure-pipelines[bot]

/azp run

yejianquan avatar Oct 09 '24 06:10 yejianquan

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 09 '24 06:10 azure-pipelines[bot]

@zbud-msft , can you please signoff on this PR?

arlakshm avatar Oct 10 '24 23:10 arlakshm

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?

zbud-msft avatar Oct 11 '24 20:10 zbud-msft

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.

wumiaont avatar Oct 14 '24 13:10 wumiaont

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

wumiaont avatar Oct 14 '24 15:10 wumiaont

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

abdosi avatar Oct 23 '24 17:10 abdosi