summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorStanislaw Kardach <stanislaw.kardach@cavium.com>2016-06-17 19:55:53 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2016-06-18 18:34:31 +0000
commit622002bea0a0eda42e9a76d14af4bdff47c692d6 (patch)
tree82f533ce65183f4a26c868cb551a23f7dac277a9 /utils
parent4328b35d1a3221e7461cc6e5cc33e7ecae4cba4e (diff)
Change IP parsing to not depend on spaces in names
Prior method of extracting the controller IP was relying on the fact that default node names have spaces in them and hence generate 9 fields before the IP address. This change proposes to change awk tokenizing to divide string by column separator in `fuel node` output. Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
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 8f5aa0800..a8eee3dd0 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -82,7 +82,7 @@ if [ "$installer_type" == "fuel" ]; then
# Check if controller is alive (online='True')
controller_ip=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \
- 'fuel node | grep controller | grep "True\| 1" | awk "{print \$10}" | tail -1') &> /dev/null
+ 'fuel node | grep controller | grep "True\| 1" | awk -F\| "{print \$5}" | tail -1') &> /dev/null
if [ -z $controller_ip ]; then
error "The controller $controller_ip is not up. Please check that the POD is correctly deployed."