mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #51986 from yujuhong/docker-pids
Automatic merge from submit-queue (batch tested with PRs 51921, 51829, 51968, 51988, 51986) COS/GCE: bump the max pids for the docker service **What this PR does / why we need it**: TasksMax limits how many threads/processes docker can create. Insufficient limit affects container starts. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51977 **Special notes for your reviewer**: **Release note**: ```release-note Ensure TasksMax is sufficient for docker ```
This commit is contained in:
commit
fa916c1002
@ -811,20 +811,26 @@ function assemble-docker-flags {
|
|||||||
# If using a network plugin, extend the docker configuration to always remove
|
# If using a network plugin, extend the docker configuration to always remove
|
||||||
# the network checkpoint to avoid corrupt checkpoints.
|
# the network checkpoint to avoid corrupt checkpoints.
|
||||||
# (https://github.com/docker/docker/issues/18283).
|
# (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
|
mkdir -p /etc/systemd/system/docker.service.d
|
||||||
cat <<EOF >/etc/systemd/system/docker.service.d/01network.conf
|
cat <<EOF >/etc/systemd/system/docker.service.d/01network.conf
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/bin/sh -x -c "rm -rf /var/lib/docker/network"
|
ExecStartPre=/bin/sh -x -c "rm -rf /var/lib/docker/network"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 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
|
EOF
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
# If using a network plugin, we need to explicitly restart docker daemon, because
|
|
||||||
# kubelet will not do it.
|
|
||||||
echo "Docker command line is updated. Restart docker to pick it up"
|
echo "Docker command line is updated. Restart docker to pick it up"
|
||||||
systemctl restart docker
|
systemctl restart docker
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function assembles the kubelet systemd service file and starts it
|
# This function assembles the kubelet systemd service file and starts it
|
||||||
|
Loading…
Reference in New Issue
Block a user