<div dir="ltr">So, the issue here (I believe) is that docker expects the various cgroups to exist in specific places. Normally that may not be much of an issue since the cgroups don't get changed while the container is running? But here, it is, because writing to the freezer cgroup is how you freeze the process. <div><br></div><div>Docker creates these paths/cgroups when the container is started, not when it's created. In the "restore --force" case used here, the container is never "started" and so that code is never run. The cgroups still get created I think, or at least, the process seems to still be being attached to a freezer cgroup (created by CRIU?) based on the log, but when docker tries to pause it tries to write to /sys/fs/cgroups/freezer/docker/<container_id> and finds that directory doesn't exist.</div><div><br></div><div>Perhaps libcontainer should be using the cgroup-root option? I'd have to run some tests to see what happens with just passing cgroup-root=/sys/fs/cgroups/freezer/docker/<container_id>.<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 7, 2015 at 11:20 AM, Francisco Tolmasky <span dir="ltr"><<a href="mailto:tolmasky@gmail.com" target="_blank">tolmasky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I believe they were all in the cgroup. Basically we create a new container with a process in it, and this container has an entry in <span style="font-size:13px">/sys/fs/cgroup/freezer/</span><span style="font-size:13px">docker/ that matches the id of the container. If I attempt to pause the container, it works as expected so I believe all the tasks are in the cgroup. At some point, this container is checkpointed.</span></div><div><br></div><div>Later, we restore a *new* container from this checkpoint. This is a force-restore on a non-started container. This container has a different id of course, but no entry in <span style="font-size:13px">/sys/fs/cgroup/freezer/</span><span style="font-size:13px">docker/. As such it thus fails to pause.</span></div><div><span style="font-size:13px"><br></span></div><div>Hopefully I’ve described the sequence of events better, but I’m happy to answer any other questions if this is vague.</div><div><br></div></div><div class="gmail_extra"><span><br><div class="gmail_quote">On Mon, Sep 7, 2015 at 1:38 AM, Pavel Emelyanov <span dir="ltr"><<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 09/06/2015 12:42 AM, Francisco Tolmasky wrote:<br>
> It seems that when I restore from a checkpoint, no entry is placed in<br>
> /sys/fs/cgroup/freezer/docker/, which leads to me not being able to pause<br>
> the container.<br>
<br>
</span>Were these tasks in that cgroup before dump?<br>
<span><br>
> I’ve seen some cgroup commits going by here, is this related/already being<br>
> addressed?<br>
><br>
> BTW, I’ve tried first making a container, then restoring into it to try to<br>
> get my freezer entry, but restore is crashing for an unrelated reason when<br>
> I do that (we’ve only ever restored from start in our use case so not sure<br>
> at all what that is about).<br>
><br>
> Thanks,<br>
><br>
> Francisco<br>
><br>
> --<br>
> Francisco Tolmasky<br>
</span>> <a href="http://www.tolmasky.com" rel="noreferrer" target="_blank">www.tolmasky.com</a> <<a href="http://www.tolmasky.com" rel="noreferrer" target="_blank">http://www.tolmasky.com</a>><br>
> <a href="mailto:tolmasky@gmail.com" target="_blank">tolmasky@gmail.com</a> <mailto:<a href="mailto:tolmasky@gmail.com" target="_blank">tolmasky@gmail.com</a>><br>
><br>
><br>
> _______________________________________________<br>
> CRIU mailing list<br>
> <a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
> <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div></span><span>-- <br><div>Francisco Tolmasky<br><a href="http://www.tolmasky.com" target="_blank">www.tolmasky.com</a><br><a href="mailto:tolmasky@gmail.com" target="_blank">tolmasky@gmail.com</a></div>
</span></div>
<br>_______________________________________________<br>
CRIU mailing list<br>
<a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a><br>
<a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
<br></blockquote></div><br></div></div></div>