-
Notifications
You must be signed in to change notification settings - Fork 732
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
Improvising pre_checks for test_reload config #7953
Conversation
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
tests/common/reboot.py
Outdated
if plt_reboot_ctrl: | ||
wait = plt_reboot_ctrl['wait'] | ||
timeout = plt_reboot_ctrl['timeout'] | ||
if plt_reboot_ctrl: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change indention here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a feasible fix, it'll only overwrite timeout if wait == 0
, however, the intention for having plt_reboot_ctrl is to give privilege for some TBs(chassis) to predefine a new timeout/wait that has more tolerance.
I just checked the wait
is only used
sonic-mgmt/tests/common/reboot.py
Line 238 in 34ce7e3
time.sleep(wait) |
5 sec
is not enough for chassis. why do we want to keep it as 5
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**the wait has kept for small duration intentionally to verifythe test -for reload configuration checks. The test is simulated to perform config reload before the dut is stablize and expect a check to the proper message.
***The plt_reboot_ctrl should only apply, if the (wait) time is not explicitly provided for a known objective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @ansrajpu-git, please check my latest change, I have added a flag to control this, instead of overwriting both timeout and wait only if wait is 0.
please see if it works for you too?
hi @ansrajpu-git, thanks for your fix.
I have confirmed this worked on Arista chassis, please also confirm if it works for your case |
@ansrajpu-git PR conflicts with 202205 branch |
@ansrajpu-git please raise an explicit PR for 202205, thanks |
…#8843) Description of PR This is cherry-pick of #7953 * Update multi_asic.py * Update sonic.py * added flag plt_reboot_ctrl_overwrite in reboot function to decide whether we want to overwrite wait and timeout. added a flag plt_reboot_ctrl_overwrite in reboot function to decide whether we want to overwrite wait and timeout. by default is to overwrite, in this test test_reload_configuration_checks we don't want to wait for that long, we want to catch transient error, so the flag is False. * changed to run on every sku with enum_rand_one_per_hwsku_hostname co-authorized by: jianquanye@microsoft.com
This PR has a few fixes missed during cherry-pick of #7953 into 202205 earlier via PR 8843 Co-authored-by: mlok <marty.lok@nokia.com>
* Fix for test_config_reload.py_Retry later error within a short interval after reboot, by adding a flag, by default we overwrite with plt_reboot_ctrl in inventory, this test does not overwrite, keep small interval * Adding checks for system up before config_reload is initiated * change to run on every sku --------- Co-authored-by: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com>
* Fix for test_config_reload.py_Retry later error within a short interval after reboot, by adding a flag, by default we overwrite with plt_reboot_ctrl in inventory, this test does not overwrite, keep small interval * Adding checks for system up before config_reload is initiated * change to run on every sku --------- Co-authored-by: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com>
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason Change-Id: Ifde0a83020bb06fb191a646e5ca91738b864ad7f
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason Change-Id: I022a948cb2e36ba7d5538258159ea047d13d80a7
1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason
Cherry-pick #11674 to 202205 branch 1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
Description of PR
This PR is an add-on to the PR #7289.To resolve intermittent failures in test_reload_configuration_checks,
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
test_config_reload is failing intermittently at:
Line 97. Even though wait parameter to reboot is being passed as 5, but if plt_reboot_dict is defined in the inventory, this wait time would be overwritten to value in plt_reboot_dict - Line 220
Line 108. After successful config reload, we are not checking for database service has started before executing config reload again. If database service has not started, we see the following exception:
How did you do it?
-the wait time should only be changed to value defined in plt_reboot_dict only when its value is 0. Else should pick the value sent in the function call.
-Check if interfaces-config.service is exited successfully & database containers has started before doing config reload for the second time
How did you verify/test it?
Ran the test against T2 chassis multiple times
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation