(BKR-1155) Add a Prefered SSH Connection Method

BKR-834 made vmhostname the default lookup method for SSH connections but this
broke hypervisors which don't have DNS support e.g. OpenStack.  By setting the
connection method in the hypervisor we can choose where to prefer specific
methods.
This commit is contained in:
Simon Murray 2017-07-11 11:45:30 +01:00
parent ee4bbc32bd
commit 8af04e5aa7
2 changed files with 30 additions and 1 deletions

View file

@ -243,6 +243,10 @@ module Beaker
@logger.debug "No disks to add for #{hostname}"
end
end
# Override SSH connection method if not already explicitly configured.
# IP addresses can change across reboots with vmpooler so prefer DNS based resolution
@hosts.each {|h| h[:connection_method] ||= 'vmhostname'}
end
def cleanup
@ -352,4 +356,4 @@ module Beaker
disk_added?(parsed[hostname], disk_size, index)
end
end
end
end