-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Containers fail to start when using --memory in docker 17.09.0-ce #35123
Comments
ping @tiborvass |
it's works in cgroupfs mode , you can change to test, but i do not know why |
I meet the same question in centos7.2. [root@k8s1-8-master ~]# docker version Server: docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --runtime-args --systemd-cgroup=true |
upgrade to docker 17.10.0-ce-rc2 work well. |
Yes, seems using |
The systemd cgroups implementation is known to be troublesome, and frequently breaks between systemd versions. For that reason, the default is to use @TimWolla does switching to |
@TimWolla does switching to `cgroupfs` resolve your issue as well?
Yes, it does.
Am 25.10.2017 um 13:44 schrieb Sebastiaan van Stijn:
… The systemd cgroups implementation is known to be troublesome, and frequently breaks between systemd versions. For that reason, the default is to use `cgroupfs` (see #17704, #16238, #16256, and various other issues). Unless you have a very specific reason to require systemd cgroups, I'd recommend using the cgroupfs option.
@TimWolla does switching to `cgroupfs` resolve your issue as well?
|
@thaJeztah what's difference between cgroupfs and systemd |
@thaJeztah Sorry to bother, I want to make sure that if this issue is fixed on 17.12, because we may upgrade to this version if it was fixed. |
@tossmilestone I tried 17.12 in past and it did not work. The version which worked for me was 17.10 |
@darshan-karia what problem did you run into? Testing this on a 17.12 machine: $ docker run -it --rm --memory 1G alpine echo hello world
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
hello world That warning indicates that the machine doesn't support swap accounting. The container started, but limiting swap is not applied; after enabling (see Your kernel does not support cgroup swap limit capabilities); $ docker run -it --rm --memory 1G alpine echo hello world
hello world |
@thaJeztah The issue I was encountering was when running a systemd container with memory option. I must have confused the versions, as I was trying many for my experiment, sorry about confusion. |
This is a test case for issue moby#35123, making sure we can set container's memory limit when using `native.cgroupdriver=systemd`. [v2: skip if no systemd present] [v3: add --iptables=false to avoid flaky tests with t.Parallel()] [v4: rebase after PR#36507 merge] Signed-off-by: Kir Kolyshkin <[email protected]>
This is a test case for issue moby/moby#35123, making sure we can set container's memory limit when using `native.cgroupdriver=systemd`. [v2: skip if no systemd present] [v3: add --iptables=false to avoid flaky tests with t.Parallel()] [v4: rebase after PR#36507 merge] Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 4ca5c5361059e29ed31074ca5b96f8b2030b5f99) Signed-off-by: Sebastiaan van Stijn <[email protected]>
The fix for this should be in Docker 17.12.1, and a test is added in #36172. I'll go ahead and close this 👍 |
This is a test case for issue moby/moby#35123, making sure we can set container's memory limit when using `native.cgroupdriver=systemd`. [v2: skip if no systemd present] [v3: add --iptables=false to avoid flaky tests with t.Parallel()] [v4: rebase after PR#36507 merge] Signed-off-by: Kir Kolyshkin <[email protected]> Upstream-commit: 4ca5c5361059e29ed31074ca5b96f8b2030b5f99 Component: engine
This is a test case for issue moby/moby#35123, making sure we can set container's memory limit when using `native.cgroupdriver=systemd`. [v2: skip if no systemd present] [v3: add --iptables=false to avoid flaky tests with t.Parallel()] [v4: rebase after PR#36507 merge] Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 4ca5c53) Signed-off-by: Sebastiaan van Stijn <[email protected]>
This is a test case for issue moby/moby#35123, making sure we can set container's memory limit when using `native.cgroupdriver=systemd`. [v2: skip if no systemd present] [v3: add --iptables=false to avoid flaky tests with t.Parallel()] [v4: rebase after PR#36507 merge] Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 4ca5c53) Signed-off-by: Sebastiaan van Stijn <[email protected]>
This is a test case for issue moby/moby#35123, making sure we can set container's memory limit when using `native.cgroupdriver=systemd`. [v2: skip if no systemd present] [v3: add --iptables=false to avoid flaky tests with t.Parallel()] [v4: rebase after PR#36507 merge] Signed-off-by: Kir Kolyshkin <[email protected]> (cherry picked from commit 4ca5c53) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Note: This already happened with 17.06, but was fixed with 17.07, it reappears with 17.09, see #34616
Description
Containers fail to start with
--memory
set.Steps to reproduce the issue:
docker run -it --rm --memory 1G debian bash
Describe the results you received:
Describe the results you expected:
A bash running inside a Debian container.
Additional information you deem important (e.g. issue happens only occasionally):
Happens even after a reboot of the complete machine.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Dedicated bare metal host running Debian Stretch.
The text was updated successfully, but these errors were encountered: