[CRIU] CRIU restored Docker IP address

Ross Boucher rboucher at gmail.com
Tue Nov 10 07:29:01 PST 2015


You'll have to exec as privileged. I'm not sure if that feature is
currently in the cli but it is in the remote API.

You want something more like: ip added add NEWIP dev eth0
On Tue, Nov 10, 2015 at 10:27 AM Rohit Upadhyaya <rohitju at cmu.edu> wrote:

> Thanks Ross, with the branch you mentioned I was able to checkpoint,
> restore and even connect to a container. But the restore and connect works
> only if the IP assigned by Docker is the same on both the checkpoint host
> and restore host. This usually means that I have to start the containers in
> order so that the Docker daemon assigns the same IP in both places. I tried
> to exec (privileged) into the machine and run 'ip addr dev eth0' but this
> just gives me a 'RTNETLINK: Operation not permitted' error. Is there
> anything else I could do?
>
> Thanks,
> Rohit
>
> On Fri, Oct 23, 2015 at 12:40 PM, Rohit Upadhyaya <rohitju at cmu.edu> wrote:
>
>> Ah I was on the wrong branch, my apologies. I am now able to see the
>> checkpoint/restore commands and will test out connecting to a restored
>> container which hopefully works. Thanks for the help!
>>
>> On Fri, Oct 23, 2015 at 12:11 PM, Ross Boucher <rboucher at gmail.com>
>> wrote:
>>
>>> Are you sure you are on the right branch? I don't think that sounds
>>> right. Sorry I'm on my phone I can look more closely in a bit.
>>> On Fri, Oct 23, 2015 at 12:06 PM Rohit Upadhyaya <rohitju at cmu.edu>
>>> wrote:
>>>
>>>> Yup I see the "# WARNING! DOCKER_EXPERIMENTAL is set: building
>>>> experimental features" message at the end. I'm using the binary
>>>> bundles/1.7.0-dev/binary/docker-1.7.0-dev since the VERSION file in the
>>>> huikang branch is 1.7.
>>>>
>>>> On Fri, Oct 23, 2015 at 10:46 AM, Ross Boucher <rboucher at gmail.com>
>>>> wrote:
>>>>
>>>>> In your build log, towards the end, you should see this:
>>>>>
>>>>> # WARNING! DOCKER_EXPERIMENTAL is set: building experimental features
>>>>>
>>>>> Are you sure that you're then using the binary in
>>>>> bundles/1.9.0-dev/binary/docker-1.9.0-dev?
>>>>>
>>>>> On Fri, Oct 23, 2015 at 10:45 AM Ross Boucher <rboucher at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I build by just running this command:
>>>>>>
>>>>>> DOCKER_EXPERIMENTAL=1 make binary
>>>>>>
>>>>>>
>>>>>> On Fri, Oct 23, 2015 at 10:43 AM Rohit Upadhyaya <rohitju at cmu.edu>
>>>>>> wrote:
>>>>>>
>>>>>>> Thanks, Ross. Would you happen to know how I would build docker with
>>>>>>> experimental features? I tried setting the DOCKER_EXPERIMENTAL=1
>>>>>>> environment variable but the generated binary does not seem to have the
>>>>>>> checkpoint and restore commands.
>>>>>>> So, networking is most likely broken in that build. If you try
>>>>>>> building from this branch, you might have better luck:
>>>>>>>
>>>>>>> https://github.com/huikang/docker/tree/fix-restore-network-cr-combined-1006
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Oct 22, 2015 at 6:50 PM Rohit Upadhyaya <rohitju at cmu.edu>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Ross,
>>>>>>>>
>>>>>>>> I am using Docker version 1.9.0 from the vagrant box here:
>>>>>>>> https://vagrantcloud.com/kimh/boxes/criu and I followed the
>>>>>>>> instructions here:
>>>>>>>> http://blog.circleci.com/checkpoint-and-restore-docker-container-with-criu/.
>>>>>>>> I am doing nothing more than running `docker checkpoint <id>` (with a TCP
>>>>>>>> server running) followed by a `docker restore <id>`.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Rohit
>>>>>>>>
>>>>>>>> On Thu, Oct 22, 2015 at 6:45 PM, Ross Boucher <rboucher at gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Rohit,
>>>>>>>>>
>>>>>>>>> Can you clarify a couple of things? Where did you get your binary
>>>>>>>>> for checkpoint/restore in docker, what version is it? And, are you just
>>>>>>>>> doing: docker checkpoint <id>; docker restore <id>; or something more
>>>>>>>>> complicated?
>>>>>>>>>
>>>>>>>>> -Ross
>>>>>>>>>
>>>>>>>>> On Thu, Oct 22, 2015 at 6:42 PM Rohit Upadhyaya <rohitju at cmu.edu>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I searched a bit on the CRIU archives and could find only one
>>>>>>>>>> thread with a similar problem:
>>>>>>>>>> https://lists.openvz.org/pipermail/criu/2015-April/020192.html
>>>>>>>>>> .How would one use netns to connect a client to a restored container? I'm
>>>>>>>>>> basically trying to reconnect to a server running on a restored Docker
>>>>>>>>>> container and am kind of stuck on the IP issue.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Rohit
>>>>>>>>>>
>>>>>>>>>> On Thu, Oct 22, 2015 at 10:04 AM, Rohit Upadhyaya <
>>>>>>>>>> rohitju at cmu.edu> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I have been playing around with CRIU with Docker and am facing a
>>>>>>>>>>> problem with the way a new IP address is assigned to a resumed container. I
>>>>>>>>>>> have a TCP server running on the container and on restore a new IP address
>>>>>>>>>>> is assigned and my client is unable to talk to the server (even on the new
>>>>>>>>>>> IP). Looking at the restore log I find that the restore process restores
>>>>>>>>>>> the socket descriptors with the old IP address. Is there any way to force
>>>>>>>>>>> the restored container to run on the old IP?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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/20151110/fe4e0732/attachment-0001.html>


More information about the CRIU mailing list