Skip to content

Commit

Permalink
Merge pull request #51991 from yujuhong/automated-cherry-pick-of-#519…
Browse files Browse the repository at this point in the history
…86-upstream-release-1.7

Automatic merge from submit-queue

Automated cherry pick of #51986

Cherry pick of #51986 on release-1.7.

#51986: COS/GCE: Ensure TasksMax is sufficient for docker
  • Loading branch information
Kubernetes Submit Queue authored Sep 7, 2017
2 parents f032a8f + b63a741 commit 1a09ac0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -746,20 +746,26 @@ function assemble-docker-flags {
# If using a network plugin, extend the docker configuration to always remove
# the network checkpoint to avoid corrupt checkpoints.
# (https://github.com/docker/docker/issues/18283).
echo "Extend the default docker.service configuration"
echo "Extend the docker.service configuration to remove the network checkpiont"
mkdir -p /etc/systemd/system/docker.service.d
cat <<EOF >/etc/systemd/system/docker.service.d/01network.conf
[Service]
ExecStartPre=/bin/sh -x -c "rm -rf /var/lib/docker/network"
EOF
fi

systemctl daemon-reload
# Ensure TasksMax is sufficient for docker.
# (https://github.com/kubernetes/kubernetes/issues/51977)
echo "Extend the docker.service configuration to set a higher pids limit"
mkdir -p /etc/systemd/system/docker.service.d
cat <<EOF >/etc/systemd/system/docker.service.d/02tasksmax.conf
[Service]
TasksMax=infinity
EOF

# If using a network plugin, we need to explicitly restart docker daemon, because
# kubelet will not do it.
systemctl daemon-reload
echo "Docker command line is updated. Restart docker to pick it up"
systemctl restart docker
fi
}

# A helper function for loading a docker image. It keeps trying up to 5 times.
Expand Down

0 comments on commit 1a09ac0

Please sign in to comment.