-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Test: additional, optional wait for vm to be reachable via ssh #1988
Conversation
The code above the stuff you added waits for the VM To report that the network is initialized, and times out if it doesn't. Why would waiting further solve the issue? |
The code waits until everything is set up properly inside the vm. On my machines (nested virtualization) sometimes the guest isn't yet reachable from the host via ssh when the vm declares itself ready. I will investigate this further - waiting for an ssh connection to become available as suggested by @jscotka might be the cleaner solution here instead of a hardcoded wait. |
The existing wait code waits for user login in the vm to become available. Sometimes, especially under load, network init can take longer. |
replaced telnet call with python socket |
@@ -665,6 +665,22 @@ def _parse_cockpit_canary(self, canary, output): | |||
return None | |||
return output[beg:end].strip() | |||
|
|||
def wait_ssh(self): |
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.
Technically this should go on 'Machine' instead of 'QemuMachine'
This time is sometimes necessary for network init Closes cockpit-project#1988
This time is sometimes necessary for network init