FS#46779 - [docker] Cannot set memory limits
Attached to Project:
Community Packages
Opened by Dan Liew (delcypher) - Sunday, 18 October 2015, 15:10 GMT
Last edited by Sébastien Luttringer (seblu) - Thursday, 22 October 2015, 19:52 GMT
Opened by Dan Liew (delcypher) - Sunday, 18 October 2015, 15:10 GMT
Last edited by Sébastien Luttringer (seblu) - Thursday, 22 October 2015, 19:52 GMT
|
Details
Description:
Setting memory limits using ``--memory=`` and ``--memory-swap=`` no longer works correctly. Additional info: * Docker 1.8.3-1 * Linux dan-sputnik 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64 GNU/Linux * systemd: 227-1 * cat /proc/cmdline ``` BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/volgroup-root resume=/dev/mapper/volgroup-swap cgroup_enable=memory swapaccount=1 ``` Steps to reproduce: 1. Try running the following $ docker run --memory=500M --memory-swap=500M -ti ubuntu:latest you will get an error message ``` Error response from daemon: Cannot start container efab30a5709ed5ef67438cfd19133c72ec74d6950936c66d6d6d2e27f387fe14: [8] System error: open /sys/fs/cgroup/memory/init.scope/system.slice/docker-efab30a5709ed5ef67438cfd19133c72ec74d6950936c66d6d6d2e27f387fe14.scope/memory.memsw.limit_in_bytes: no such file or directory. ``` 2. If you try the command above without specifying ``--memory-swap=`` the container will start but a warning shows up in Docker's logs ``` Oct 18 15:55:48 dan-sputnik docker[7070]: time="2015-10-18T15:55:48.989117494+01:00" level=warning msg="Your kernel does not support OOM notifications: open /sys/fs/cgroup/memory/init.scope/system.slice/docker-cd0d56a244162b406f9cad46c81950643c9b8143ddb6e3410901539bab92161c.scope/memory.oom_control: no such file or directory" ``` I've filled this bug upstream ( https://github.com/docker/docker/issues/17151 ) but I thought I should file the issue here too |
This task depends upon
Closed by Sébastien Luttringer (seblu)
Thursday, 22 October 2015, 19:52 GMT
Reason for closing: Fixed
Additional comments about closing: docker 1:1.8.3-2
Thursday, 22 October 2015, 19:52 GMT
Reason for closing: Fixed
Additional comments about closing: docker 1:1.8.3-2
Looks like this issue was also reported upstream at
https://github.com/docker/docker/issues/16256
https://github.com/hashicorp/nomad/issues/171
Apparently passing ``--exec-opt native.cgroupdriver=cgroupfs`` to the daemon fixes the issue. I will report back.
I'll push a new package patching this.