Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust TSA-TSB related sonic-mgmt testcases #16807

Merged

Conversation

deepak-singhal0408
Copy link
Contributor

Description of PR

Summary:
TSA-TSB service Testcases: Adjust the testcases to adhere to new behavior of config_reload

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

As a fix for the issue sonic-net/sonic-buildimage#21586, TSA-TSB service is invoked upon swss bring up(sonic-net/sonic-buildimage#21587).
This affects config_reload behavior, where after config reload the tsa-tsb service will be restarted, and the device will be in TSA state till timer expires. Adjusting the testcase to explicitly execute TSB for the DUT to be ready for next testcase,

How did you do it?

Enhanced the config_reload api to optionally take exec_tsb parameter. For startup-TSA-TSB and reliable TSA-TSB testcases, pass this flag to True to explicitly execute TSB on the device after config reload.

How did you verify/test it?

Ran the tests on t2

Any platform specific information?

NA

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

NA

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tjchadaga
Copy link
Contributor

tjchadaga commented Feb 10, 2025

@deepak-singhal0408 - Don't we need this in other bgp tests as well - test_traffic_shift.py, test_seq_idf_isolation.py, test_passive_peering.py etc?

I'm wondering if making exec_tsb=True as default and passing False would make this simpler

@deepak-singhal0408
Copy link
Contributor Author

test_traffic_shift.py

@deepak-singhal0408 - Don't we need this in other bgp tests as well - test_traffic_shift.py, test_seq_idf_isolation.py, test_passive_peering.py etc?

I'm wondering if making exec_tsb=True as default and passing False would make this simpler

@tjchadaga , by default tsa-tsb service is disabled(as part of pretest).. Only for reliable_tsa and test_startup_tsa_tsb_service modules we explicitly enable this service.

@deepak-singhal0408
Copy link
Contributor Author

@tjchadaga regarding the individual testcase run scenario, pre-test/post-test are run by default (unless we expicitly disable them)..

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202405: Azure/sonic-mgmt.msft#84

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 14, 2025
TSA-TSB service Testcases: Adjust the testcases to adhere to new behavior of config_reload
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #16961

@cyw233
Copy link
Contributor

cyw233 commented Feb 14, 2025

Hey @deepak-singhal0408, I can see we didn't add exec_tsb=True to the config_reload() function in test_dut_tsa_with_conf_reload_when_sup_on_tsa_dut_on_tsb_init() and test_sup_tsa_act_when_duts_on_tsa_with_sup_config_reload(). Is this intentional, please? If not, should we add to them as well? (PR ready: #16962)

FYI, bgp/test_reliable_tsa.py has been split into two parts: bgp/reliable_tsa/test_reliable_tsa_flaky.py and bgp/reliable_tsa/test_reliable_tsa_stable.py in the latest master, for better retry and debugging experience. Thanks

cc. @yejianquan for viz

@deepak-singhal0408
Copy link
Contributor Author

Hey @deepak-singhal0408, I can see we didn't add exec_tsb=True to the config_reload() function in test_dut_tsa_with_conf_reload_when_sup_on_tsa_dut_on_tsb_init() and test_sup_tsa_act_when_duts_on_tsa_with_sup_config_reload(). Is this intentional, please? If not, should we add to them as well? (PR ready: #16962)

FYI, bgp/test_reliable_tsa.py has been split into two parts: bgp/reliable_tsa/test_reliable_tsa_flaky.py and bgp/reliable_tsa/test_reliable_tsa_stable.py in the latest master, for better retry and debugging experience. Thanks

cc. @yejianquan for viz

@cyw233 its intentional.. we dont want to explicitly call tsb in those cases.

@cyw233
Copy link
Contributor

cyw233 commented Feb 14, 2025

we dont want to explicitly call tsb in those case

oh ok, got it. Then I will close PR #16962

@mssonicbld
Copy link
Collaborator

@deepak-singhal0408 PR conflicts with 202411 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants