Fix the false alarm of checking reboot result#2096
Merged
wangxin merged 1 commit intosonic-net:masterfrom Aug 14, 2020
wangxin:fix-reboot
Merged
Fix the false alarm of checking reboot result#2096wangxin merged 1 commit intosonic-net:masterfrom wangxin:fix-reboot
wangxin merged 1 commit intosonic-net:masterfrom
wangxin:fix-reboot
Conversation
After PR "#2063 Fix the issue of no 'failed' field in failed ansible module result " is merged, the ansible module result will no longer have the 'failed' field filtered out. We now can count on the 'is_failed' property of ansible module result to tell if it is failed or not. However, just assert that the result is failed if the 'failed' field is in the result dict is not safe now. It's because the 'failed' field may have value 'false'. The reboot function in reboot.py may raise false alarm "DUT was not shutdown". The fix: * Explicitly check the 'is_failed' property of localhost.wait_for result to determine whether the DUT is down or up as expected. Signed-off-by: Xin Wang <[email protected]>
neethajohn
approved these changes
Aug 13, 2020
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
a6d35de Handling Invalid CRM configuration gracefully (sonic-net#2109) d6559e6 [Mellanox] '_8lane' not added to Mellanox 5xxx models with 800G (sonic-net#2090) 45551b2 [vnetorch] Advertise vnet tunnel routes (sonic-net#2058) ed58d2f Add initial value for weight in overlay nexthops (sonic-net#2096)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
After PR "#2063 Fix the issue of no 'failed' field in failed ansible module result "
is merged, the ansible module result will no longer have the 'failed' field filtered out. We now can count on the 'is_failed'
property of ansible module result to tell if it is failed or not. However, just assert that the result is failed if the 'failed' field
is in the result dict is not safe now. It's because the 'failed' field may have value 'false'. The reboot function in reboot.py
may raise false alarm "DUT was not shutdown".
How did you do it?
The fix:
How did you verify/test it?
Test run a simple script calling the reboot function defined in tests/common/reboot.py.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation