Skip to content

Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496#12238

Merged
abdosi merged 4 commits intosonic-net:masterfrom
sanjair-git:tsa-tsb-service
May 16, 2024
Merged

Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496#12238
abdosi merged 4 commits intosonic-net:masterfrom
sanjair-git:tsa-tsb-service

Conversation

@sanjair-git
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

  • This PR has tests to verify the changes introduced as part of #18496
  • Basically, this PR has 5 test cases to verify start and stop of the new service 'startup_tsa_tsb.service' added by #18496 including other checks.

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

  • To verify code changes introduced as part of the PR #18496

How did you do it?

  • Added 5 test cases as mentioned below to verify the changes.
  • Attaching test cases' description document here for further reference and details.
    BGP-TSA-TSB-Service-TestCases.txt
  1. test_tsa_tsb_service_with_dut_cold_reboot
  2. test_tsa_tsb_service_with_dut_abnormal_reboot
  3. test_tsa_tsb_service_with_supervisor_cold_reboot
  4. test_tsa_tsb_service_with_supervisor_abnormal_reboot
  5. test_tsa_tsb_service_with_user_init_tsa

How did you verify/test it?

  • Ran all the above mentioned test cases on a T2 chassis and made sure tests passed with expected behavior.

Any platform specific information?

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

Documentation

image

@mssonicbld
Copy link
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.................................................Passed
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_startup_tsa_tsb_service.py:385:47: E128 continuation line under-indented for visual indent
tests/bgp/test_startup_tsa_tsb_service.py:503:51: E128 continuation line under-indented for visual indent

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>

@deepak-singhal0408 deepak-singhal0408 self-requested a review April 11, 2024 04:01
@rlhui rlhui added the P0 label Apr 18, 2024
@rlhui rlhui requested a review from tjchadaga April 18, 2024 17:49
@tjchadaga
Copy link
Contributor

tjchadaga commented Apr 25, 2024

@sanjair-git - could we add testcases to validate the behavior when user issues TSA/TSB while the service is running? This could be from linecard or supervisor

Also, a case to validate whether the tsa-tsb timer is sufficient for the system to be stable (ports up, critical services, bgp state etc)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a wait here? Don't we expect this to have completed by the time the tsa-tsb timer expires?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to wait more here after tsa-tsb timer expires. Removed the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this required? In what cases does TSC error out after TSA-TSB timer expiry?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required actually. Added it for debugging purposes initially. Removed it now.

Change supervisor crash comment

Skip tsa_tsb_service tests for other platforms till it is supported

Generic changes - enable_disable_startup_tsa_tsb_service

Modify imm/cpm references

Add module-ignore-errors for dut commands
Modify pretest/posttest - platform generic

Modify pretest/posttest - platform generic
@sanjair-git
Copy link
Contributor Author

@sanjair-git - could we add testcases to validate the behavior when user issues TSA/TSB while the service is running? This could be from linecard or supervisor

Also, a case to validate whether the tsa-tsb timer is sufficient for the system to be stable (ports up, critical services, bgp state etc)

@tjchadaga, For the new test cases, I will raise a separate PR. Other comments, I have looked into it and resolved. Reran the whole test suite again with the changes. Results below,

image

@abdosi abdosi merged commit cb63ea5 into sonic-net:master May 16, 2024
rlhui pushed a commit that referenced this pull request Jul 5, 2024
…PR#12238 (#12781)

This PR has additional new test cases to verify the changes introduced as part of # Linecard startup-TSA-TSB sonic-buildimage#18496.
This PR is dependent on PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 #12238
Basically, this PR has new 4 test cases in addition to the 5 test cases added to verify start and stop of the new service 'startup_tsa_tsb.service' introduced by PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 #12238
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jul 10, 2024
…PR#12238 (sonic-net#12781)

This PR has additional new test cases to verify the changes introduced as part of # Linecard startup-TSA-TSB sonic-buildimage#18496.
This PR is dependent on PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 sonic-net#12238
Basically, this PR has new 4 test cases in addition to the 5 test cases added to verify start and stop of the new service 'startup_tsa_tsb.service' introduced by PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 sonic-net#12238
mssonicbld pushed a commit that referenced this pull request Jul 13, 2024
…PR#12238 (#12781)

This PR has additional new test cases to verify the changes introduced as part of # Linecard startup-TSA-TSB sonic-buildimage#18496.
This PR is dependent on PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 #12238
Basically, this PR has new 4 test cases in addition to the 5 test cases added to verify start and stop of the new service 'startup_tsa_tsb.service' introduced by PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 #12238
mrkcmo pushed a commit to Azarack/sonic-mgmt that referenced this pull request Jul 17, 2024
…PR#18496 (sonic-net#12238)

This PR has tests to verify the changes introduced as part of sonic-net#18496
Basically, this PR has 5 test cases to verify start and stop of the new service 'startup_tsa_tsb.service' added by sonic-net#18496 including other checks.
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
…PR#12238 (sonic-net#12781)

This PR has additional new test cases to verify the changes introduced as part of # Linecard startup-TSA-TSB sonic-buildimage#18496.
This PR is dependent on PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 sonic-net#12238
Basically, this PR has new 4 test cases in addition to the 5 test cases added to verify start and stop of the new service 'startup_tsa_tsb.service' introduced by PR Tests to verify 'startup_tsa_tsb.service' during linecard bring up - PR#18496 sonic-net#12238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants