[CRIU] Docker Live migration using CRIU

Hui Kang hkang.sunysb at gmail.com
Mon Jan 4 01:25:54 PST 2016


Hi, Vijay,
I just realized that the C/R feature of docker is under extensive
development and discussion these days. So it has not been an upstream
experimental feature.

As of now, will you be able to use the docker version provided in the
docker to try the migration feature?

https://github.com/xemul/p.haul/blob/master/test/docker/HOWTO

- Hui

On Mon, Jan 4, 2016 at 4:35 PM, Vijay Kilari <vijay.kilari at gmail.com> wrote:
> Hi Hui,
>
>   I am trying to migrate on the same machine (arm64) . I am running
> p.haul service and client on
> the same machine.
>
> After copying pycriu from to /usr/local/lib/python-2.7/ from criu path
> and installing
> missing python packages like protobuf, ipaddr I finally face below error
>
> The p_haul_docker.py is now looking for "containers" directory inside
> /var/lib/docker/.
>
> However there is no such directory called containers. Any idea?
>
> SRC:
> -------
>
> ubuntu at ubuntu:~/criu/p.haul$ sudo ./p.haul-wrap client 0.0.0.0 docker
> 02e2ad5ab840
> Establish connection...
> Exec p.haul: ./p.haul docker 02e2ad5ab840 --to 0.0.0.0 --fdrpc 3 --fdmem 4
>
> 07:23:10.195: Starting p.haul
> 07:23:10.196: Use existing connections, fdrpc=3 fdmem=4 fdfs=None
> 07:23:10.196: Setting up local
> 07:23:10.197: `- Passing (ctl:7, data:6) pair to CRIU
> 07:23:10.200: [Errno 2] No such file or directory: '/var/lib/docker/containers'
> Traceback (most recent call last):
>   File "./p.haul", line 45, in <module>
>     worker = phaul.iters.phaul_iter_worker(ph_type, connection)
>   File "/home/ubuntu/criu/p.haul/phaul/iters.py", line 39, in __init__
>     self.htype = htype.get_src(p_type)
>   File "/home/ubuntu/criu/p.haul/phaul/htype.py", line 35, in get_src
>     ht.init_src()
>   File "/home/ubuntu/criu/p.haul/phaul/p_haul_docker.py", line 37, in init_src
>     self.full_ctid = self.get_full_ctid()
>   File "/home/ubuntu/criu/p.haul/phaul/p_haul_docker.py", line 78, in
> get_full_ctid
>     dir_name_list = os.listdir(os.path.join(docker_dir, "containers"))
> OSError: [Errno 2] No such file or directory: '/var/lib/docker/containers'
> Error (cr-service.c:879): Can't recv request: Connection reset by peer
> ubuntu at ubuntu:~/criu/p.haul$
>
> ubuntu at ubuntu:~/criu/p.haul$ sudo ls /var/lib/docker/
> 0.0          graph  init       network              tmp    vfs
> devicemapper  image  linkgraph.db  repositories-devicemapper  trust  volumes
>
>
> On Mon, Jan 4, 2016 at 11:33 AM, Vijay Kilari <vijay.kilari at gmail.com> wrote:
>> Hi Hiu,
>>
>> I am using latest docker with checkpoint and restore feature enabled.
>> Using this docker version, I could do docker native checkpoint/restore
>> successfully.
>>
>> I tried p.haul as described in the link given by you. When p.haul
>> service is launched,
>> p.haul could not connect. p.haul keeps waiting for connection..
>> See below log
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ubuntu at ubuntu:~/docker$ criu --version
>> Version: 1.8
>> GitID: v1.8-193-g6aede7f
>>
>> ubuntu at ubuntu:~/criu/p.haul$ ps -eaf | grep criu
>> ubuntu   25624     1  0 05:46 ?        00:00:00 criu service -o
>> _local_/log -v4 --daemon
>> ubuntu   25718 25524  0 05:56 pts/2    00:00:00 grep --color=auto criu
>>
>> ubuntu at ubuntu:~/criu/p.haul$ ps -eaf | grep docker
>> root       915     1  0  2015 ?        00:15:28 /usr/bin/docker daemon -H fd://
>> ubuntu   25720 25524  0 05:56 pts/2    00:00:00 grep --color=auto docker
>>
>> ubuntu at ubuntu:~/criu/p.haul$ sudo docker version
>> Client:
>>  Version:      1.10.0-dev
>>  API version:  1.22
>>  Go version:   go1.5.2
>>  Git commit:   66581cd-dirty
>>  Built:        Thu Dec 17 09:07:33 2015
>>  OS/Arch:      linux/arm64
>>  Experimental: true
>>
>> Server:
>>  Version:      1.10.0-dev
>>  API version:  1.22
>>  Go version:   go1.5.2
>>  Git commit:   66581cd-dirty
>>  Built:        Thu Dec 17 09:07:33 2015
>>  OS/Arch:      linux/arm64
>>  Experimental: true
>>
>> ubuntu at ubuntu:~/criu/p.haul$ ./p.haul-wrap service
>> Waiting for connection...
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> On Thu, Dec 31, 2015 at 12:00 PM, Hui Kang <hkang.sunysb at gmail.com> wrote:
>>> Hi, Vijay,
>>> Please check out this
>>> https://github.com/xemul/p.haul/blob/master/test/docker/HOWTO
>>> Please note that you may need a later version of docker binary.
>>>
>>> - Hui
>>>
>>> On Thu, Dec 31, 2015 at 2:20 PM, Vijay Kilari <vijay.kilari at gmail.com> wrote:
>>>> Hi,
>>>>
>>>>    What is the current status of docker live migration using CRIU?.
>>>> Is there any wiki/blog which provides steps for doing live migration of docker?
>>>>
>>>> Regards
>>>> Vijay
>>>> _______________________________________________
>>>> CRIU mailing list
>>>> CRIU at openvz.org
>>>> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list