summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormeimei <meimei@huawei.com>2016-01-15 09:11:57 +0800
committermeimei <meimei@huawei.com>2016-01-15 09:11:57 +0800
commit47d18b53152d5cee56eecc1e95cc6f25135fc36c (patch)
tree3accf4856dcddeb5bcbc48b558367cb39ad6edde
parente37a8657c37812fe5aa985472a67e9b51aef9afd (diff)
compass-bugfix: fetch os creds from host1-5
Change-Id: I9acce6f1dabb5186375894cdcdc83b392e9d872e Signed-off-by: meimei <meimei@huawei.com>
-rwxr-xr-xutils/fetch_os_creds.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index 3b493e146..d1b192dcb 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -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