[CRIU] Do anyone knows how to migrate a container with web app

Weicheng SUN sunweicheng0001 at gmail.com
Wed Apr 27 22:01:26 PDT 2016


Hi Everyone,

The latest release of cr-combined said that it supports network. Then I do
some experiments. I use
1. docker run -d -v demo:/data --name=redis redis:latest
2. docker run -d -e USE_REDIS_HOST=redis --link redis:redis -p 80:80
--name=app binocarlos/moby-counter:latest
which is a demo of simple website and redis is its storage. I first run
them on host A

I try to checkpoint them and copy to another host(host B). I create two
containers with same configuration of them and applied the change of file
system to the new created container. Then I tried to restore them, which
sometimes came out a wrong result.
I notice that when redis and app have same ip address on host A and B, then
the restore will success. But, when they have different IP on two hosts,
the restore progress will certainly broken.

The reason I guess is that the state of tcp connection in checkpoint image
didn't match the new environment in host B. For example, redis in host A is
17.172.20.1 and app in host A is 17.172.20.2, then for app there is a
connection whose remote host is 17.172.20.1. Then come to host B, if redis
in host B is 17.172.20.3 and when I try to restore app, criu will confuse
where is 17.172.20.1(redis)?

Generally, is there always a problem to checkpoint and restore a container,
who has a link with other containers, on the another host?

And who knows that how to use a specific IP address while start a new
container? For the latest release of cr-combined doesn't support docker run
--ip. Even --ip is supported, it requires a user defined network, default
network is not supported.

Hopes for your kindly response & wish all of you a great day!

Regards,

David Sun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20160428/5c3ad7ab/attachment-0001.html>


More information about the CRIU mailing list