Skip to content

[Chassis] Test cases to validate TSA/B from supervisor on T2#8615

Merged
tjchadaga merged 11 commits intosonic-net:masterfrom
tjchadaga:tsa_test_on_sup
Jul 5, 2023
Merged

[Chassis] Test cases to validate TSA/B from supervisor on T2#8615
tjchadaga merged 11 commits intosonic-net:masterfrom
tjchadaga:tsa_test_on_sup

Conversation

@tjchadaga
Copy link
Copy Markdown
Contributor

@tjchadaga tjchadaga commented Jun 15, 2023

Description of PR

Summary:
Changes to test TSA/B functionality from the supervisor of T2 chassis

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

sonic-net/sonic-buildimage#14691 added support for TSA/B to be invoked from supervisor. New test cases are being added to test this feature.

How did you do it?

Add test cases to run TSA, TSB from supervisor and verify that each linecard's traffic shift state is updated. Also added a test case to save TSA state from the supervisor and perform config reload on all linecards to ensure the 'maintenance' state is persisted

How did you verify/test it?

Loaded image with sonic-net/sonic-buildimage#14691 and sonic-net/sonic-utilities#2850 and ran the test cases

Any platform specific information?

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

T2

Documentation

@tjchadaga tjchadaga requested a review from arlakshm June 15, 2023 02:10
@mssonicbld
Copy link
Copy Markdown
Collaborator

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/bgp/test_traffic_shift_sup.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/bgp/test_traffic_shift_sup.py:25:1: E302 expected 2 blank lines, found 1
tests/bgp/test_traffic_shift_sup.py:43:25: E128 continuation line under-indented for visual indent
tests/bgp/test_traffic_shift_sup.py:95:14: E114 indentation is not a multiple of 4 (comment)
tests/bgp/test_traffic_shift_sup.py:95:14: E116 unexpected indentation (comment)
...
[truncated extra lines, please run pre-commit locally to view full check results]

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
Copy link
Copy Markdown
Collaborator

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/bgp/test_traffic_shift_sup.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
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
Copy link
Copy Markdown
Collaborator

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/bgp/test_traffic_shift_sup.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
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>

@tjchadaga tjchadaga merged commit bf19dd4 into sonic-net:master Jul 5, 2023
@tjchadaga tjchadaga deleted the tsa_test_on_sup branch July 5, 2023 22:35
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jul 10, 2023
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202205: #8865

AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
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