Skip to content
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

Wait for guest connection before test restart #3291

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tmt/steps/execute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,15 @@ def handle_restart(self) -> bool:
else:
self._restart_count += 1

# Even though the reboot was not requested, it might have
# still happened! Imagine a test configuring autoreboot on
# kernel panic plus a test restart. The reboot would happen
# beyond tmt's control, and tmt would try to restart the
# test, but the guest may be still booting. Make sure it's
# alive.
if not self.guest.reconnect():
return False

self.logger.debug(
f"Test restart during test '{self.test}'"
f" with reboot count {self._reboot_count}"
Expand Down
Loading