Merge pull request #15822 from ZJU-SEL/minor-clean-reconfDocker

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-10-20 11:08:02 -07:00
commit c8dd1200c4

View File

@ -34,7 +34,7 @@ function config_etcd {
else
# enough timeout??
if (( attempt > 600 )); then
echo "timeout for waiting network config" > ~/kube/err.log
echo "timeout waiting for /coreos.com/network/config" >> ~/kube/err.log
exit 2
fi
@ -46,8 +46,17 @@ function config_etcd {
}
function restart_docker {
#wait some secs for /run/flannel/subnet.env ready
sleep 15
attempt=0
while [[ ! -f /run/flannel/subnet.env ]]; do
if (( attempt > 200 )); then
echo "timeout waiting for /run/flannel/subnet.env" >> ~/kube/err.log
exit 2
fi
attempt=$((attempt+1))
sleep 3
done
sudo ip link set dev docker0 down
sudo brctl delbr docker0