From 1cda941e95c7a8dfd7183d7307c84d0d1d2a2a91 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 8 Aug 2014 15:15:05 +0100 Subject: 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. --- scripts/release-test | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts/release-test') diff --git a/scripts/release-test b/scripts/release-test index 97e4a45a..fd71fdc3 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) -- cgit v1.2.1