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

Test: additional, optional wait for vm to be reachable via ssh #1988

Closed
wants to merge 1 commit into from

Conversation

dperpeet
Copy link
Contributor

This time is sometimes necessary for network init

@stefwalter stefwalter added the question Further information is requested label Mar 24, 2015
@stefwalter
Copy link
Contributor

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?

@dperpeet
Copy link
Contributor Author

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.

@dperpeet dperpeet added needswork and removed question Further information is requested labels Mar 24, 2015
@dperpeet
Copy link
Contributor Author

The existing wait code waits for user login in the vm to become available. Sometimes, especially under load, network init can take longer.

@dperpeet dperpeet changed the title Test: add optional delay while waiting for vm to have booted Test: additional, optional wait for vm to be reachable via ssh Mar 24, 2015
@dperpeet
Copy link
Contributor Author

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):
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants