[CRIU] question on live migration for docker container using CRIU

Saied Kazemi saied at google.com
Sun Jan 4 10:15:36 PST 2015


Glad that it works for you, and thanks for confirming.

--Saied


On Sun, Jan 4, 2015 at 2:21 AM, mona kashkoush
<monakashkoush89 at gmail.com> wrote:
> thank you very much , this patch is very helpful
>
> On Fri, Jan 2, 2015 at 9:28 PM, Saied Kazemi <saied at google.com> wrote:
>>
>> Mona,
>>
>> Pertaining to my previous reply, I just sent a patch for docker_cr.sh
>> helper script to dynamically determine the right dockerinit file.  It
>> may be easier for you to apply this patch and use it going forward.
>>
>> --Saied
>>
>>
>>
>> On Fri, Jan 2, 2015 at 9:43 AM, Saied Kazemi <saied at google.com> wrote:
>> > Hi Mona,
>> >
>> > As Pavel pointed out, the error is due to not being able to bind mount
>> > an external file.  But this is not because a the --ext-mount-map
>> > command line option is missing.  It's because docker_cr.sh does not
>> > know the dockerinit file name in /var/lib/docker/init (by default, it
>> > assume Docker 1.0.0).
>> >
>> > Since you are running Docker 1.4, you need to change the following
>> > BIND_MOUNT line in docker_cr.sh to reflect what you have in
>> > /var/lib/docker/init:
>> >
>> > # since older versions of docker bind mount /.dockerinit but
>> > # the path cannot be queried by docker inspect, we have to
>> > # hard code it here
>> > BIND_MOUNT[/.dockerinit]="${DOCKER_HOME}/init/dockerinit-1.0.0"
>> >
>> > Hope this helps.
>> >
>> > --Saied
>> >
>> >
>> > On Wed, Dec 31, 2014 at 2:28 AM, Pavel Emelyanov <xemul at parallels.com>
>> > wrote:
>> >> On 12/31/2014 04:36 AM, mona kashkoush wrote:
>> >>>
>> >>> i tried to  do a live migration for docker container using CRIU 1.4
>> >>> but dumping failed and this error appeared
>> >>>
>> >>> $  criu dump --tree <pid> --images-dir <path-to-existing-directory>
>> >>> --leave-stopped
>> >>>
>> >>> Error (mount.c:624): 125:./etc/hosts doesn't have a proper root mount
>> >>> Error (files-reg.c:764): Unaccessible path opened 52:21244, need
>> >>> 5:1029
>> >>> Error (cr-dump.c:1601): Dump files (pid: 3906) failed with -1
>> >>> Error (cr-dump.c:1964): Dumping FAILED.
>> >>>
>> >>> and when i used the automated script "docker_cr.sh " for docker
>> >>> container migration , this succeeded for
>> >>> dumping  but failed for restoring and this error appeared
>> >>>
>> >>> $ /src/criu-1.4/contrib/docker_cr.sh -r -v <container_id>
>> >>>
>> >>> restore failed
>> >>> (00.072030)      1: Error (mount.c:1543): Can't mount at
>> >>> ./.dockerinit: No such file or directory
>> >>
>> >> Hm... This looks like some missed --ext-mount-map thing. Can you find
>> >> out the
>> >> exact command line docker_cr.sh calls CRIU with?
>> >>
>> >> Hopefully Saied (in Cc) can also advise something.
>> >>
>> >>> (00.072076) Error (cr-restore.c:1838): Restoring FAILED.
>> >>>
>> >>> * this is information about docker which i used
>> >>>
>> >>> Storage Driver: aufs
>> >>>  Root Dir: /var/lib/docker/aufs
>> >>>  Dirs: 67
>> >>> Execution Driver: native-0.2
>> >>> Kernel Version: 3.13.0-43-generic
>> >>>
>> >>> thanks for your time
>> >>>
>> >>> --
>> >>> Mona Salah
>> >>> Research Assistant
>> >>> IRI institute
>> >>> The City of Scientific Research and Technology Applications,Alex ,
>> >>> Egypt
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> CRIU mailing list
>> >>> CRIU at openvz.org
>> >>> https://lists.openvz.org/mailman/listinfo/criu
>> >>>
>> >>
>
>
>
>
> --
> Mona Salah
> Research Assistant
> IRI institute
> The City of Scientific Research and Technology Applications,Alex , Egypt


More information about the CRIU mailing list