[CRIU] Can’t pause restored containers (no entry in /sys/fs/cgroup/freezer/docker/ )

Ross Boucher rboucher at gmail.com
Mon Sep 7 15:00:54 PDT 2015


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.

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.

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>.

On Mon, Sep 7, 2015 at 11:20 AM, Francisco Tolmasky <tolmasky at gmail.com>
wrote:

> 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
> /sys/fs/cgroup/freezer/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.
>
> 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 /sys/fs/cgroup/freezer/docker/. As such it
> thus fails to pause.
>
> Hopefully I’ve described the sequence of events better, but I’m happy to
> answer any other questions if this is vague.
>
>
> On Mon, Sep 7, 2015 at 1:38 AM, Pavel Emelyanov <xemul at parallels.com>
> wrote:
>
>> On 09/06/2015 12:42 AM, Francisco Tolmasky wrote:
>> > It seems that when I restore from a checkpoint, no entry is placed in
>> > /sys/fs/cgroup/freezer/docker/, which leads to me not being able to
>> pause
>> > the container.
>>
>> Were these tasks in that cgroup before dump?
>>
>> > I’ve seen some cgroup commits going by here, is this related/already
>> being
>> > addressed?
>> >
>> > BTW, I’ve tried first making a container, then restoring into it to try
>> to
>> > get my freezer entry, but restore is crashing for an unrelated reason
>> when
>> > I do that (we’ve only ever restored from start in our use case so not
>> sure
>> > at all what that is about).
>> >
>> > Thanks,
>> >
>> > Francisco
>> >
>> > --
>> > Francisco Tolmasky
>> > www.tolmasky.com <http://www.tolmasky.com>
>> > tolmasky at gmail.com <mailto:tolmasky at gmail.com>
>> >
>> >
>> > _______________________________________________
>> > CRIU mailing list
>> > CRIU at openvz.org
>> > https://lists.openvz.org/mailman/listinfo/criu
>> >
>>
>>
>
>
> --
> Francisco Tolmasky
> www.tolmasky.com
> tolmasky at gmail.com
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150907/de80d9eb/attachment.html>


More information about the CRIU mailing list