Fix incorrect nova config init script
nova-console-compute-init.sh and nove_consolt-proxy-init.sh generates incorrect configuration if there exists multiple IP address on default interface. To solve this problem, we pickup first IP address if there exists multiple IP on that interface. Change-Id: Iaadd2e71d624122e68fdd628771df21cd61c0784
This commit is contained in:
parent
b4abb63298
commit
22965babe4
@ -37,7 +37,7 @@ if [ -z "${client_address}" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# determine client ip dynamically based on interface provided
|
# 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
|
fi
|
||||||
|
|
||||||
if [ -z "${listen_ip}" ] ; then
|
if [ -z "${listen_ip}" ] ; then
|
||||||
|
@ -37,7 +37,7 @@ if [ -z "${client_address}" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# determine client ip dynamically based on interface provided
|
# 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
|
fi
|
||||||
|
|
||||||
if [ -z "${listen_ip}" ] ; then
|
if [ -z "${listen_ip}" ] ; then
|
||||||
@ -56,4 +56,4 @@ cat <<EOF>/tmp/pod-shared/nova-spice.ini
|
|||||||
server_proxyclient_address = $client_address
|
server_proxyclient_address = $client_address
|
||||||
server_listen = $listen_ip
|
server_listen = $listen_ip
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user