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>
# 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."