compass-bugfix: fetch os creds from host1-5 67/6767/1
authormeimei <meimei@huawei.com>
Fri, 15 Jan 2016 01:11:57 +0000 (09:11 +0800)
committermeimei <meimei@huawei.com>
Fri, 15 Jan 2016 01:11:57 +0000 (09:11 +0800)
Change-Id: I9acce6f1dabb5186375894cdcdc83b392e9d872e
Signed-off-by: meimei <meimei@huawei.com>
utils/fetch_os_creds.sh

index 3b493e1..d1b192d 100755 (executable)
@@ -115,7 +115,7 @@ elif [ "$installer_type" == "compass" ]; then
     verify_connectivity $installer_ip
     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;}}'  \
+        | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"host[1-5]\"/) {print $(i+1);break;}}'  \
         | grep -oP "\d+.\d+.\d+.\d+")
 
     if [ -z $controller_ip ]; then