Skip to content

Update test_po_cleanup.py #5466

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

Merged
merged 6 commits into from
Apr 15, 2022
Merged

Update test_po_cleanup.py #5466

merged 6 commits into from
Apr 15, 2022

Conversation

wenyiz2021
Copy link
Contributor

@wenyiz2021 wenyiz2021 commented Apr 4, 2022

Update same changes in master branch from PR: (#5453)

Description of PR

Execute an "config_reload" at the end of test_po_cleanup, to start up not only all critical services, but also wait for all port, interfaces, bgp neighbors to come up.
Call duthost.stop_service("swss") directly from duthost, instead of passing each asics inside the test_po_cleanup. to avoid execution sequence of test_po_cleanup[asic0], test_po_cleanup_after_reload[duthost], test_po_cleanup[asic1].

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

For a multi-asic device, restart of swss and teamd is done per asic, noticed that for a 6-asic device, asic3 and asic4 are experiencing more time during restart. Also, interfaces and bgp neighbors need more minutes to come back. Execute a config_reload at the end of test_po_cleanup helps to bring back processes in a safe manner.
duthost.asic_instance(enum_asic_index).start_service("swss")
assert wait_until(300, 20, 0, duthost.critical_services_fully_started),\

  "Not all critical services are fully started"

E AssertionError: Not all critical services are fully started
duthost =
duthosts = []
enum_asic_index = 3
enum_rand_one_per_hwsku_frontend_hostname = 'xxx'
tbinfo = {'auto_recover': 'True', 'comment': 'Arvind', 'conf-name': 'xxx', 'duts': ['xxx'], ...}
[pc/test_po_cleanup.py:66: AssertionError]

How did you do it?

How did you verify/test it?

pc/test_po_cleanup.py::test_po_cleanup[str-masic-acs-2] PASSED [100%]

---------------------------------------------------------------------------------------------- generated xml file: /var/src/sonic-mgmt-int/tests/logs/tr.xml ----------------------------------------------------------------------------------------------
=============================================================================================================== 1 passed in 489.35 seconds ================================================================================================================

Any platform specific information?

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

Documentation

Update same changes in master branch from PR: (#5453)
@wenyiz2021 wenyiz2021 requested a review from judyjoseph April 4, 2022 18:51
@wenyiz2021 wenyiz2021 requested a review from a team as a code owner April 4, 2022 18:51
@wenyiz2021 wenyiz2021 requested a review from rlhui April 4, 2022 18:52
@wenyiz2021 wenyiz2021 requested a review from sujinmkang as a code owner April 13, 2022 23:51
@wenyiz2021 wenyiz2021 merged commit 5e7ea57 into sonic-net:master Apr 15, 2022
@Blueve
Copy link
Collaborator

Blueve commented Apr 28, 2022

We observed this issue on 202012 branch. Need back port it

@wenyiz2021
Copy link
Contributor Author

We observed this issue on 202012 branch. Need back port it

What issue do you see? This change is already in 202012 from PR #5453

@wangxin
Copy link
Collaborator

wangxin commented Apr 28, 2022

As @wenyiz2021 said, this change has been backported to 202012 branch by PR #5453. No need to do cherry-pick again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants