Move CNI config file to the end of launch script

So something waiting for the config (e.g. Kubernetes) doesn't try to
talk to Weave before then (this only helps on first install, but that
tends to be when things are busiest).
This commit is contained in:
Bryan Boreham committed 2016-11-14 12:37:42 +00:00
1 parent 1629f4f3f0
commit f8693074a3
1 file changed
+11 -11
+11 -11
View File
@@ -18,17 +18,6 @@ fi
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
# Create CNI config, if not already there
if [ ! -f /etc/cni/net.d/10-weave.conf ] ; then
mkdir -p /etc/cni/net.d
cat > /etc/cni/net.d/10-weave.conf <<EOF
{
"name": "weave",
"type": "weave-net"
}
EOF
fi
SOURCE_BINARY=/usr/bin/weaveutil
VERSION=$(/home/weave/weaver --version | sed -E 's/weave router (.*?)/\1/')
PLUGIN="weave-plugin-$VERSION"
@@ -152,4 +141,15 @@ done
reclaim_ips "_" $IPS
done
# Create CNI config, if not already there
if [ ! -f /etc/cni/net.d/10-weave.conf ] ; then
mkdir -p /etc/cni/net.d
cat > /etc/cni/net.d/10-weave.conf <<EOF
{
"name": "weave",
"type": "weave-net"
}
EOF
fi
wait $WEAVE_PID