Fix an incorrect key path on copying logs

Magnum SSH into each bay node and copy logs when a test fails.
The specified SSH key path is relative to the home directory ("~"),
which didn't get expanded correctly.

Change-Id: Ie7265adf8027309a4482247283dd52a18397d5d7
Closes-Bug: #1566501
This commit is contained in:
Hongbin Lu 2016-04-05 15:56:06 -04:00
parent b225ccdbc5
commit 68b51d2134
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ PRIVATE_KEY=
echo "If private key is specified, save to temp and use that; else, use default"
if [[ "$KEYPAIR" == "default" ]]; then
PRIVATE_KEY="~/.ssh/id_rsa"
PRIVATE_KEY=$(readlink -f ~/.ssh/id_rsa)
else
PRIVATE_KEY="$(mktemp id_rsa.$SSH_IP.XXX)"
echo -en "$KEYPAIR" > $PRIVATE_KEY