summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-10-15 08:25:44 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-10-27 09:09:20 +0000
commitf199ddc09831e8eb0111069f3495de8c1bd71471 (patch)
tree4e2995252281f579aec8e406744d269f3bfe4b70 /scripts
parent1e0771efd2313d6a07f0f088e0bf4660154054fd (diff)
downloaddefinitions-f199ddc09831e8eb0111069f3495de8c1bd71471.tar.gz
Stop assuming that known_hosts exists, and fix a typo
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-test2
-rwxr-xr-xscripts/release-test-os4
2 files changed, 5 insertions, 1 deletions
diff --git a/scripts/release-test b/scripts/release-test
index b2bca58d..a1611721 100755
--- a/scripts/release-test
+++ b/scripts/release-test
@@ -185,6 +185,8 @@ class Deployment(object):
@staticmethod
def _ssh_host_key_exists(hostname):
"""Check if an ssh host key exists in known_hosts"""
+ if not os.path.exists('/root/.ssh/known_hosts'):
+ return False
with open('/root/.ssh/known_hosts', 'r') as known_hosts:
return any(line.startswith(hostname) for line in known_hosts)
diff --git a/scripts/release-test-os b/scripts/release-test-os
index ca4bd485..15cb2ef4 100755
--- a/scripts/release-test-os
+++ b/scripts/release-test-os
@@ -274,6 +274,8 @@ class Deployment(object):
@staticmethod
def _ssh_host_key_exists(hostname):
"""Check if an ssh host key exists in known_hosts"""
+ if not os.path.exists('/root/.ssh/known_hosts'):
+ return False
with open('/root/.ssh/known_hosts', 'r') as known_hosts:
return any(line.startswith(hostname) for line in known_hosts)
@@ -361,7 +363,7 @@ class Deployment(object):
# Get ip address from nova list
nl = NovaList()
ip_addr = nl.get_nova_ip_for_instance_timeout(hostname)
- print "IP address for inastance %s: %s" % (hostname, ip_addr)
+ print "IP address for instance %s: %s" % (hostname, ip_addr)
return DeployedSystemInstance(self, config, self.host_machine,
vm_id, rootpath, ip_addr, hostname)