diff --git a/nova/templates/bin/_nova-console-compute-init.sh.tpl b/nova/templates/bin/_nova-console-compute-init.sh.tpl index 24c3b4312d..aa94ca118a 100644 --- a/nova/templates/bin/_nova-console-compute-init.sh.tpl +++ b/nova/templates/bin/_nova-console-compute-init.sh.tpl @@ -37,7 +37,7 @@ if [ -z "${client_address}" ] ; then fi # determine client ip dynamically based on interface provided - client_address=$(ip a s $client_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}') + client_address=$(ip a s $client_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}' | head -n 1) fi if [ -z "${listen_ip}" ] ; then diff --git a/nova/templates/bin/_nova-console-proxy-init.sh.tpl b/nova/templates/bin/_nova-console-proxy-init.sh.tpl index 37000e651c..9bed70dcbf 100644 --- a/nova/templates/bin/_nova-console-proxy-init.sh.tpl +++ b/nova/templates/bin/_nova-console-proxy-init.sh.tpl @@ -37,7 +37,7 @@ if [ -z "${client_address}" ] ; then fi # determine client ip dynamically based on interface provided - client_address=$(ip a s $client_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}') + client_address=$(ip a s $client_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}' | head -n 1) fi if [ -z "${listen_ip}" ] ; then @@ -56,4 +56,4 @@ cat </tmp/pod-shared/nova-spice.ini server_proxyclient_address = $client_address server_listen = $listen_ip EOF -fi \ No newline at end of file +fi