Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform: fix docker ulimit configuring for latest EKS AMI #1349

Merged
merged 8 commits into from
Dec 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion deploy/modules/aws/tidb-cluster/templates/userdata.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,17 @@ root soft core unlimited
root soft stack 10240
EOF

# config docker ulimit
# configure ulimit of docker daemon, it is also the max value of ulimit the containers could be set
# change 'infinity' to '1048576' explicitly to workaround https://github.com/systemd/systemd/issues/6559
cp /usr/lib/systemd/system/docker.service /etc/systemd/system/docker.service
sed -i 's/LimitNOFILE=infinity/LimitNOFILE=1048576/' /etc/systemd/system/docker.service
sed -i 's/LimitNPROC=infinity/LimitNPROC=1048576/' /etc/systemd/system/docker.service

# configure ulimit of containers, the ulimit requirement(82920) of tikv is greater than the default(65536).
if ! grep -qF "OPTIONS" /etc/sysconfig/docker; then
echo 'OPTIONS="--default-ulimit nofile=1024000:1024000"' >> /etc/sysconfig/docker
fi

systemctl daemon-reload
systemctl restart docker

Expand Down