-
Notifications
You must be signed in to change notification settings - Fork 614
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
Issue mounting memory cgroup in Docker #28
Comments
I remember that the memory controller is disabled by default in Debian |
This issue is reproduced if a kernel is booted with cgroup_disable=memory |
CRIU parses /proc/cgroups to collect controllers Disabled cgroups show up in /proc/cgroups |
@boucher Thanks for the forward. However I have come to other issues, I will explain it here but tell me if I need to make a new post. I'm working on: Linux debian 4.0.0+ #2 SMP Fri Sep 11 14:27:32 CEST 2015 x86_64 GNU/Linux First daemon logs until I kill it: http://pastebin.com/3zneGWDp I don't have any restore logs since the daemon killed the container when it was restarted for the second time and I can't figure out why (I can do multiple C/R with the same daemon session). The second issue is quite similar. It's when I try to checkpoint the container then kill the daemon and reboot my computer. The folder with the container-id as name in /var/run/docker/execdriver/native is missing. Sorry for my English, it's not my first language. |
Are you still using the precompiled version of Docker posted to my releases On Fri, Sep 11, 2015 at 9:05 AM, eliams notifications@github.com wrote:
|
@boucher @eliams I think you're talking about this PR |
Sorry for the long response time, I didn't find some time during the weekend to test. |
You have to build with the docker experimental flag
|
@klesgidis Thanks ! So I tried both and end up with this: The test-huikang-fix branch:The restore part fail if I restart the daemon before restoring. daemon logs before restart: http://pastebin.com/nuDwmFKw The cr-combined branch:C/R is working well and I was able to restart the daemon before each restore without trouble. daemon logs before reboot: http://pastebin.com/gPt3kpPk It's look like it's still the /var/run/docker folder that is deleted when rebooting. daemon logs: http://pastebin.com/LvAgh0kL |
@eliams Did you reboot the machine or just the docker deamon before your restoring the checkpoint container? Which CRIU version did you use? |
@huikang When I only stop and restart the daemon it works, it's when I also reboot the machine that I am not able to restart the container. EDIT: criu 1.7 builed from sources EDIT-bis: daemon logs: http://pastebin.com/mAu1eexQ |
@eliams Thanks for the detailed information. I will look at it. |
@eliams The reason that all the images are lost after rebooting the machine is that all directory under /var/run/ will be re-created each time you reboot the machine. Also make sure you do not have another default docker running, which may also create this directory. So to avoid this, when you start the docker-checkpoint-v1.9 daemon, use --exec-root=/root/ to appoint to another place. @boucher since we need to keep the checkpointed images persistent, the default exec-root should not be the ephemeral /var/run. Thought? |
Yes, we should move it to /var/lib/docker On Tue, Sep 15, 2015 at 1:48 PM, huikang notifications@github.com wrote:
|
@boucher cool. If you want, I can send you a PR based on your cr-combined branch later. |
I tried the --exec-root option, I end up with the same error and I still needed Restore command output: Daemon logs: Restore logs: Full logs are in my previous message. I tried to do the echo command before restoring the container and I got: I also tried to redo the restore command after that the first one failed and that I did the echo 0. The second one didn't work either but I end up with different restore log: http://pastebin.com/j3t1N875 Finally I found by accident a way to make the restoring work, I just need to Here are the restore log: http://pastebin.com/Yt1DJq5s |
Some controllers can be disabled in kernel options. In this case they are shown in /proc/cgroups, but they could not be mounted. All enabled controllers can be collected from /proc/self/cgroup. https://github.com/xemul/criu/issues/28 v2: ',' is used to separate controllers Cc: Tycho Andersen <tycho.andersen@canonical.com> Reported-by: Ross Boucher <boucher@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Patch d3be641 regarding this issue is in master |
I tried with the patch, I still have the same issue. |
@eliams Did using --exec-root solve the problem of missing criu images? @xemul Will this patch in runc (opencontainers/runc#184) help to solve the cgroup problem? |
@huikang it looks like we have several issues discussed here :) First one was -- disabled cgroups weren't handled by CRIU, not is' fixed by @avagin . The next issue was from @eliams regarding the killed and restarted Docker daemon. This particular one (AFAIU) is fixed in @boucher tree and the pull request you mention is it. |
@eliams I use --exec-root to store checkpointed container images to a place other than /var/run/docker. Then I restart my machine and start docker daemon. The checkointed container can be restored without any fault. My host OS is ubuntu 14.04
|
@xemul Sorry, I did not realize for which issue the patch was. It effectively fix the disabled cgroups issue. Thanks ! The second issue (restarting the docker daemon before restoring worked only the first time. At the second time, the container was killed by the daemon at restart) was fixed in @boucher tree. @huikang Using --exec-root solved the problem of missing criu image. The last issue now is that when I reboot my machine I can't restore a container. I'm on debian with custon kernel: criu: Docker: Server: |
Some controllers can be disabled in kernel options. In this case they are shown in /proc/cgroups, but they could not be mounted. All enabled controllers can be collected from /proc/self/cgroup. https://github.com/xemul/criu/issues/28 v2: ',' is used to separate controllers Cc: Tycho Andersen <tycho.andersen@canonical.com> Reported-by: Ross Boucher <boucher@gmail.com>
I'm passing along a bug reported to me via email. Let me know if you'd prefer sending this type of thing to the mailing list in the future.
My configuration:
Linux ismael 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3
(2015-08-04) x86_64 GNU/Linux
I am using the last release compiled version of Docker Experimental
v1.9.0 with the compiled version of CRIU v1.6 and libprotobuf:
https://github.com/boucher/docker/releases
I start the daemon:
sudo ./docker-1.9.0-dev daemon
then a container:
docker run -d --publish-service test busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
the checkpoint goes well:
sudo ./docker-1.9.0-dev checkpoint --image-dir=/home/ismael/images --work-dir=/home/ismael/logs <container id>
but the restore part fail:
sudo ./docker-1.9.0-dev restore --image-dir=/home/ismael/images --work-dir=/home/ismael/logs <container id>
It output:
Error response from daemon: Cannot restore container 7cbe526dbef8d71c98ea7b365ebc1a12325ddc300216a6697e37831a8f56af44: criu failed: type RESTORE errno 0
dump log: https://gist.github.com/boucher/d6803d75a14606bd95fb
restore log: https://gist.github.com/boucher/ab66916846d27c73d361
The text was updated successfully, but these errors were encountered: