Fix SSH handling in sanity tests

If file ~/.ssh/known_hosts doesn't exist (as when new VM is used)
ssh-keyscan -R will fail

Change-Id: I989fd3ef3ea541e6e63da6059ca0f6ff0a55bcaa
This commit is contained in:
Kaspars Skels 2018-10-21 14:03:06 -05:00
parent bd84989801
commit 419fd6b2d6
1 changed files with 2 additions and 0 deletions

View File

@ -89,7 +89,9 @@ function wait_for_ssh_port {
wait_for_ssh_port $FLOATING_IP
# SSH into the VM and check it can reach the outside world
touch ~/.ssh/known_hosts
ssh-keygen -R "$FLOATING_IP"
ssh-keyscan "$FLOATING_IP" >> ~/.ssh/known_hosts
ssh -i ${OSH_VM_KEY_STACK} cirros@${FLOATING_IP} ping -q -c 1 -W 2 ${OSH_EXT_GATEWAY}