Browse Source

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

changes/16/772716/1
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
22053bf283
2 changed files with 7 additions and 0 deletions
  1. +3
    -0
      magnum/drivers/common/templates/fragments/configure_docker_storage_driver_fedora_coreos.sh
  2. +4
    -0
      magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh

+ 3
- 0
magnum/drivers/common/templates/fragments/configure_docker_storage_driver_fedora_coreos.sh 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
}


+ 4
- 0
magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh 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


Loading…
Cancel
Save