Browse Source

Update default values for docker nofile and vm.max_map_count

Task: 40801
Story: 2008098

Change-Id: I1802e4002d9aa89a321f130a16fd8021a773b73a
changes/69/749169/4
Feilong Wang 11 months ago
parent
commit
385bc9700b
  1. 3
      magnum/drivers/common/templates/fragments/configure_docker_storage_driver_fedora_coreos.sh
  2. 4
      magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh

3
magnum/drivers/common/templates/fragments/configure_docker_storage_driver_fedora_coreos.sh

@ -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
}

4
magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh

@ -29,6 +29,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

Loading…
Cancel
Save