Neutron: check that local ip address is populated on agent startup
This PS updates the agent init container scripts to ensure that the local IP address is populated on agent startup. Change-Id: Ib5857d9dc82b1138a1b5f496ebe46dc1e3f221e7 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
32934d8826
commit
fed9fb3ca3
@ -41,8 +41,13 @@ if [ -z "${tunnel_interface}" ] ; then
|
||||
fi
|
||||
|
||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||
IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
cat <<EOF>/tmp/pod-shared/ml2-local-ip.ini
|
||||
LOCAL_IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
if [ -z "${LOCAL_IP}" ] ; then
|
||||
echo "Var LOCAL_IP is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tee > /tmp/pod-shared/ml2-local-ip.ini << EOF
|
||||
[vxlan]
|
||||
local_ip = $IP
|
||||
local_ip = "${LOCAL_IP}"
|
||||
EOF
|
||||
|
@ -52,8 +52,13 @@ if [ -z "${tunnel_interface}" ] ; then
|
||||
fi
|
||||
|
||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
||||
IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
cat <<EOF>/tmp/pod-shared/ml2-local-ip.ini
|
||||
LOCAL_IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||
if [ -z "${LOCAL_IP}" ] ; then
|
||||
echo "Var LOCAL_IP is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tee > /tmp/pod-shared/ml2-local-ip.ini << EOF
|
||||
[ovs]
|
||||
local_ip = $IP
|
||||
local_ip = "${LOCAL_IP}"
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user