Merge "Update default values for docker nofile and vm.max_map_count" into stable/ussuri

This commit is contained in:
Zuul 2020-11-09 14:28:13 +00:00 committed by Gerrit Code Review
commit 22053bf283
2 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,9 @@ configure_storage_driver_generic() {
fi
if [ ${CONTAINER_RUNTIME} = "host-docker" ] ; then
sed -i -E 's/^OPTIONS=("|'"'"')/OPTIONS=\1--storage-driver='$1' /' /etc/sysconfig/docker
# NOTE(flwang): The default nofile limit it too low, update it to
# match the default value in containerd
sed -i -E 's/--default-ulimit nofile=1024:1024/--default-ulimit nofile=1048576:1048576/' /etc/sysconfig/docker
fi
}

View File

@ -31,6 +31,10 @@ _addtl_mounts=',{"type":"bind","source":"/opt/cni","destination":"/opt/cni","opt
if [ "$NETWORK_DRIVER" = "calico" ]; then
echo "net.ipv4.conf.all.rp_filter = 1" >> /etc/sysctl.conf
# NOTE(flwang): The default value for vm.max_map_count is too low, update
# it to 262144 to meet the minium requirement of Elasticsearch
echo "vm.max_map_count = 262144" >> /etc/sysctl.conf
$ssh_cmd sysctl -p
if [ "$($ssh_cmd systemctl status NetworkManager.service | grep -o "Active: active")" = "Active: active" ]; then
CALICO_NM=/etc/NetworkManager/conf.d/calico.conf