summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-11-19 10:45:27 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-11-19 10:45:28 +0000
commitbd1799ce5a7786d7fcf7b2f82e729d66627c2f9f (patch)
tree7c5a2d96dafb1ff2dd2be3add7da03c5bacaf99e /utils
parent47ba5f223cc3eb6f3c08d7b3ae147f7f5c52c563 (diff)
parente5ac91b4087aa724b0552201b5f35835b55bc218 (diff)
Merge "[functest] modify releng/utils/fetch_os_creds.sh to adapt compass"
Diffstat (limited to 'utils')
-rwxr-xr-xutils/fetch_os_creds.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index cefc85761..7a5f8121a 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -126,14 +126,12 @@ elif [ "$installer_type" == "foreman" ]; then
| grep $admin_ip | sed 's/ /\n/g' | grep ^http | head -1) &> /dev/null
elif [ "$installer_type" == "compass" ]; then
- #ip_compass="10.1.0.12"
verify_connectivity $installer_ip
-
- # controller_ip='10.1.0.222'
- controller_ip=$(sshpass -p'root' ssh 2>/dev/null -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@10.1.0.12 \
- 'mysql -ucompass -pcompass -Dcompass -e"select package_config from cluster;"' \
- | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"ha_proxy\": {\"vip\":/)print $i}' \
+ controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \
+ 'mysql -ucompass -pcompass -Dcompass -e"select * from cluster;"' \
+ | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"host1\"/) {print $(i+1);break;}}' \
| grep -oP "\d+.\d+.\d+.\d+")
+
if [ -z $controller_ip ]; then
error "The controller $controller_ip is not up. Please check that the POD is correctly deployed."
fi