summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-05-24 09:46:29 -0400
committerTim Rozet <trozet@redhat.com>2017-05-24 09:46:29 -0400
commitffb2f32f8dccad3f892dd137a797d7ccd8bd8243 (patch)
tree21b95945b6ba1f85caa87f85627acfbe0162cbaf /utils
parentefe68a7d2781f79b240a6f1bd3a1dd3798775df0 (diff)
Functest: Adds failure checking + fixes fetch os creds
Change-Id: Ib8a3ff3a747be55d8e23513bd028d934fef02eb8 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/fetch_os_creds.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index a5d5f8f3b..458bbda3b 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -7,7 +7,9 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-
+set -o errexit
+set -o nounset
+set -o pipefail
usage() {
echo "usage: $0 [-v] -d <destination> -i <installer_type> -a <installer_ip>" >&2
@@ -157,8 +159,8 @@ elif [ "$installer_type" == "compass" ]; then
sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:~/admin-openrc.sh $dest_path &> /dev/null
info "This file contains the mgmt keystone API, we need the public one for our rc file"
- grep "OS_AUTH_URL.*v2" $dest_path > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
+
+ if grep "OS_AUTH_URL.*v2" $dest_path > /dev/null 2>&1 ; then
public_ip=$(sshpass -p root ssh $ssh_options root@${installer_ip} \
"ssh ${controller_ip} 'source /opt/admin-openrc.sh; openstack endpoint show identity '" \
| grep publicurl | awk '{print $4}')