-
Notifications
You must be signed in to change notification settings - Fork 85
Reboot crossing watchdog timeout #2939
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
Open
pasinskim
wants to merge
3
commits into
master
Choose a base branch
from
reboot-crossing-watchdog-timeout
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
95d9a43
test(deployments): derive reboot-crossing deployment timeout from cli…
pasinskim e6b5bd5
test(state_scripts): wait past the client reboot watchdog for reboot-…
pasinskim 30a455b
test(fault_tolerance): wait past the client reboot watchdog for reboo…
pasinskim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| ) | ||
| from .common_update import common_update_procedure, update_image_failed | ||
| from ..MenderAPI import DeviceAuthV2, Deployments, logger | ||
| from ..MenderAPI.deployments import REBOOT_CROSSING_DEPLOYMENT_TIMEOUT | ||
| from .mendertesting import MenderTesting | ||
|
|
||
|
|
||
|
|
@@ -156,8 +157,10 @@ def do_test_update_image_breaks_networking( | |
| deployment_id, _ = common_update_procedure( | ||
| broken_network_image, devauth=devauth, deploy=deploy | ||
| ) | ||
| reboot.verify_reboot_performed() # since the network is broken, two reboots will be performed, and the last one will be detected | ||
| deploy.check_expected_statistics(deployment_id, "failure", 1) | ||
| reboot.verify_reboot_performed(max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT) # since the network is broken, two reboots will be performed, and the last one will be detected | ||
| deploy.check_expected_statistics( | ||
| deployment_id, "failure", 1, max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT | ||
| ) | ||
|
|
||
| def do_test_deployed_during_network_outage( | ||
| self, | ||
|
|
@@ -194,8 +197,10 @@ def do_test_deployed_during_network_outage( | |
| self.manipulate_network_connectivity(mender_device, True) | ||
|
|
||
| logger.info("Network stabilized") | ||
| reboot.verify_reboot_performed() | ||
| deploy.check_expected_statistics(deployment_id, "success", 1) | ||
| reboot.verify_reboot_performed(max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand the reasoning here. If we wait here for the deployment to finish (successfully), then why would we need to wait for the client watchdog to kill mender-update? If it happens, then there would be no successfully deployment AFAIK. |
||
| deploy.check_expected_statistics( | ||
| deployment_id, "success", 1, max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT | ||
| ) | ||
|
|
||
| assert mender_device.yocto_id_installed_on_machine() == expected_yocto_id | ||
|
|
||
|
|
@@ -270,7 +275,7 @@ def do_test_image_download_retry_timeout( | |
| mender_device, True, hosts=[blocked_service] | ||
| ) | ||
|
|
||
| reboot.verify_reboot_performed() | ||
| reboot.verify_reboot_performed(max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT) | ||
| deploy.check_expected_status("finished", deployment_id) | ||
|
|
||
| assert mender_device.get_active_partition() == inactive_part | ||
|
|
@@ -388,7 +393,7 @@ def do_test_image_download_retry_download_count( | |
| ) | ||
|
|
||
| if success: | ||
| reboot.verify_reboot_performed() | ||
| reboot.verify_reboot_performed(max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT) | ||
| deploy.check_expected_status("finished", deployment_id) | ||
|
|
||
| assert mender_device.get_active_partition() == inactive_part | ||
|
|
@@ -435,7 +440,7 @@ def do_test_image_download_retry_hosts_broken( | |
| ) | ||
| mender_device.run("sed -i.bak '/1.1.1.1/d' /etc/hosts") | ||
|
|
||
| reboot.verify_reboot_performed() | ||
| reboot.verify_reboot_performed(max_wait=REBOOT_CROSSING_DEPLOYMENT_TIMEOUT) | ||
| deploy.check_expected_status("finished", deployment_id) | ||
|
|
||
| assert mender_device.get_active_partition() == inactive_part | ||
|
|
||
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
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.
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.
won't we as a result wait
2*REBOOT_CROSSING_DEPLOYMENT_TIMEOUT? Once in verify_reboot_performed and a second time in check_expected_statistics?I think there's no reason to wait for statistics this long.