summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-08-29 09:57:48 -0400
committerTim Rozet <trozet@redhat.com>2017-08-29 09:57:48 -0400
commit5b8d42064af9ee791b72bcda840decffd9e18c66 (patch)
tree58e1eee6b68c519aea2c84f0e3697c1ad10d9da9
parentccd98e34b65d3273d2919e2aa7f90e8bfa8f89a2 (diff)
Apex, Yardstick: Fixes fetching creds
There is a bug where by default the INSTALLER_IP is set to 192.168.X.X and in yardstick the IP is never found for Apex before trying to fetch, so fetching fails to an invalid IP address. This patch makes fetch os creds more robust to check if the INSTALLER_IP is valid and if not, then attempt to find the correct IP for Apex. Change-Id: Ie18d6e70f77ccff3592fb37c6d0b6e87b6435cf8 Signed-off-by: Tim Rozet <trozet@redhat.com>
-rwxr-xr-xutils/fetch_os_creds.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index 312e1ac5c..8fbbdce65 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -144,6 +144,13 @@ if [ "$installer_type" == "fuel" ]; then
echo $auth_url >> $dest_path
elif [ "$installer_type" == "apex" ]; then
+ if ! ipcalc -c $installer_ip; then
+ installer_ip=$(virsh domifaddr undercloud | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
+ if [ -z "$installer_ip" ] || ! $(ipcalc -c $installer_ip); then
+ echo "Unable to find valid IP for Apex undercloud: ${installer_ip}"
+ exit 1
+ fi
+ fi
verify_connectivity $installer_ip
# The credentials file is located in the Instack VM (192.0.2.1)