openvswitch: wait for ovs socket readiness
Add a check (with a timeout) to wait for the openvswitch socket to prevent erronious crashes on inital startup. Change-Id: I000425a439f320974904129b65b7840702693ab4
This commit is contained in:
parent
609ce478f5
commit
2715620d17
@ -24,6 +24,18 @@ modprobe openvswitch
|
|||||||
modprobe gre
|
modprobe gre
|
||||||
modprobe vxlan
|
modprobe vxlan
|
||||||
|
|
||||||
|
sock="/var/run/openvswitch/db.sock"
|
||||||
|
t=0
|
||||||
|
while [ ! -e "${sock}" ] ; do
|
||||||
|
echo "waiting for ovs socket $sock"
|
||||||
|
sleep 1
|
||||||
|
t=$(($t+1))
|
||||||
|
if [ $t -ge 10 ] ; then
|
||||||
|
echo "no ovs socket, giving up"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
ovs-vsctl --no-wait show
|
ovs-vsctl --no-wait show
|
||||||
|
|
||||||
external_bridge="{{- .Values.network.external_bridge -}}"
|
external_bridge="{{- .Values.network.external_bridge -}}"
|
||||||
|
Loading…
Reference in New Issue
Block a user