Merge "Neutron: check that local ip address is populated on agent startup"
This commit is contained in:
commit
87fc03793b
@ -41,8 +41,13 @@ if [ -z "${tunnel_interface}" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
# 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}')
|
LOCAL_IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||||
cat <<EOF>/tmp/pod-shared/ml2-local-ip.ini
|
if [ -z "${LOCAL_IP}" ] ; then
|
||||||
|
echo "Var LOCAL_IP is empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tee > /tmp/pod-shared/ml2-local-ip.ini << EOF
|
||||||
[vxlan]
|
[vxlan]
|
||||||
local_ip = $IP
|
local_ip = "${LOCAL_IP}"
|
||||||
EOF
|
EOF
|
||||||
|
@ -52,8 +52,13 @@ if [ -z "${tunnel_interface}" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
|
# 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}')
|
LOCAL_IP=$(ip a s $tunnel_interface | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')
|
||||||
cat <<EOF>/tmp/pod-shared/ml2-local-ip.ini
|
if [ -z "${LOCAL_IP}" ] ; then
|
||||||
|
echo "Var LOCAL_IP is empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tee > /tmp/pod-shared/ml2-local-ip.ini << EOF
|
||||||
[ovs]
|
[ovs]
|
||||||
local_ip = $IP
|
local_ip = "${LOCAL_IP}"
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user