summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJun Li <matthew.lijun@huawei.com>2017-02-09 01:50:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-09 01:50:56 +0000
commit55c3c221b98fdef67cb074818b8652fc1ef76956 (patch)
tree9bb3a9ed7bef72cd870fc070e8242475eb301268 /utils
parentf1f78989e9c80da4cda93226c8d6198f9bccfb35 (diff)
parent01fe2364f175bc0904003e281df66cdaaedea869 (diff)
Merge "[bugfix] wrong regular expression to fetch controller ip by hostname"
Diffstat (limited to 'utils')
-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 c1e21f316..f00e022f9 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -144,7 +144,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~/\"host[1-5]\"/) {print $(i+1);break;}}' \
+ | awk -F"," '{for(i=1;i<NF;i++)if($i~/\"127.0.0.1\"/) {print $(i+2);break;}}' \
| grep -oP "\d+.\d+.\d+.\d+")
if [ -z $controller_ip ]; then