Update test_po_cleanup.py #5466
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Back port request
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),\
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