summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-08-08 14:15:05 (GMT)
committerRichard Maw <richard.maw@codethink.co.uk>2014-08-19 15:49:03 (GMT)
commit1cda941e95c7a8dfd7183d7307c84d0d1d2a2a91 (patch)
tree086e483342f9e9bc4c55247810f3bc56d62bb0a7 /scripts
parent9fc790f4a776e9d57b509b607b3a048b467e4cab (diff)
downloaddefinitions-1cda941e95c7a8dfd7183d7307c84d0d1d2a2a91.tar.gz
Never remember hosts when running ssh commands on instances
The rest of the ssh commands are to the VM host, which we can't change all of, since some are run as part of the deployment extension.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-test6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/release-test b/scripts/release-test
index 97e4a45..fd71fdc 100755
--- a/scripts/release-test
+++ b/scripts/release-test
@@ -115,7 +115,8 @@ class DeployedSystemInstance(object):
return 'root@{host}'.format(host=self.ip_address)
def runcmd(self, argv, chdir='.', **kwargs):
- ssh_cmd = ['ssh', '-o', 'StrictHostKeyChecking=no', self.ssh_host]
+ ssh_cmd = ['ssh', '-o', 'StrictHostKeyChecking=no',
+ '-o', 'UserKnownHostsFile=/dev/null', self.ssh_host]
cmd = ['sh', '-c', 'cd "$1" && shift && exec "$@"', '-', chdir]
cmd += argv
ssh_cmd.append(' '.join(map(pipes.quote, cmd)))
@@ -159,9 +160,6 @@ class DeployedSystemInstance(object):
self._wait_for_ssh(timeout)
def delete(self):
- # Forget config of deployed system as if it ever reappears it
- # will have different host keys
- cliapp.runcmd(['ssh-keygen', '-R', self.config['HOSTNAME']])
# Stop and remove VM
try:
self.host_machine.virsh('destroy', self.vm_id)