Skip to content

Fix handling of SSH's 'Name or service not known'

There's a problem with the Paramiko SSH library which doesn't handle SSH connection errors consistently (see this issue) and depending on what version of paramiko is installed and whether there already is an older hostname entry in libvirt dnsmasq's leases file we may either get an instance of OSError from the socket library or an instance of NoValidConnectionsError from paramiko when trying to determine if a machine is fully booted and ready to be used. This is quite annoying and unfortunately for us it means we have to catch both exceptions and examine the errno code to determine if the SSH connection attempt failed with Name or service not known which is expected and hence we need to wait a little longer.

Merge request reports

Loading