rancher-desktop icon indicating copy to clipboard operation
rancher-desktop copied to clipboard

[BUG] `/proc/sys/vm/max_map_count` from host is not leveraged for running containers

Open irishgordo opened this issue 2 years ago • 4 comments

Actual Behavior

There are instances where running a container will need an increase within the vm.max_map_count from the host. An example would be running Elasticsearch in containers, cross-ref here.

Steps to Reproduce

  • remember your original max_map_count, via cat /proc/sys/vm/max_map_count, in order to revert back later
  • have Rancher Desktop Electron application not running
  • in this distinct example leveraging Elasticsearch per their docs for v6.8, for a 'production' style environment we'll need to have the max_map_count increased, via something like: sudo sysctl -w vm.max_map_count=262144
  • then you can re-cat /proc/sys/vm/max_map_count
  • then launching the electron Rancher Desktop application
  • then running Elasticsearch for instance of:
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e xpack.security.enabled=false -e node.name=es01 -it docker.elastic.co/elasticsearch/elasticsearch:6.8.23
  • you'll be able to audit that the run should fail

Result

From the interactive container logs it shows exit status code 1 and a comment that the max_map_count is too low and needs to be increased:

[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

Expected Behavior

That setting the vm.max_map_count on the host machine would be picked up by Rancher Desktop.

Additional Information

No response

Rancher Desktop Version

1.6.2

Rancher Desktop K8s Version

1.23.4

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Ubuntu

Operating System / Build Version

Ubuntu based distro -> Pop!_OS 22.04 LTS

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

No response

irishgordo avatar Nov 23 '22 18:11 irishgordo