[CRIU] criu + threaded program + TCP_REPAIR

Tycho Andersen tycho.andersen at canonical.com
Sun Oct 19 08:45:36 PDT 2014


On Sat, Oct 18, 2014 at 05:47:22PM -0400, Sowmini Varadhan wrote:
> On (10/14/14 14:29), Pavel Emelyanov wrote:
> >
> > Ah, live migration :) You may be interested in the
> > https://github.com/xemul/p.haul
> 
> A few questions.. So I tried starting from 
>   https://github.com/xemul/p.haul/wiki/Live-migrating-OVZ-mainstream-container
> Some hiccups I ran into..
> 1. in my ubuntu vm, env was in /usr/bin/env by default, I had to fix up
>    p.haul-service manually to detect this. (minor errata in p.haul-service?)
> 2. the HOWTO page does not mention that you need the python-protobuf.socketrpc
>    package (and s/protobuf-python/python-protobuf)- might be good to call this
>    out, and I did the apt install of these, but...
> 3. Various errors like
>     " File "/home/sowmini/src/p.haul/p_haul_service.py", line 6, in <module>
>        import rpc_pb2 as cr_rpc"
>    In each case I had to specify the src package
>     from protobuf.socketrpc import rpc_pb2 as cr_rpc
>    Is there something wrong in my env that I need this?
> 4. where (what apt package/src) to get stats_pb2.py? It wasnt there in
>    python-protobuf[.socketrpc]

stats_pb2.py is a generated file (based on the stats.proto in the criu
directory). I guess you need to run some generation step to get these
before running the code?

> And if I used lxc tools to create the container, but what is the $id
> that is expected by p.haul?

I think this is the pid of what to haul, so probably the container's
init, i.e. `lxc-info -n $name -H -p`.

Tycho

> In any case, I also tried to just spawn my process from something like
> ns_child_exec.c [http://lwn.net/Articles/533492/].
> 
> So if I do this:
> 
>   # ns_child_exec -v -p bash
>   pidns# iperf -s &
> 
> Now, do I criu-dump/restore using the pid of ns_child_exec? Or the
> pid(bash)?  Or the pid(iperf)?  (from default pidns? from the child
> pidns?)
> 
> If I try to dump using pid(ns_child_exec) I get 
> 
> root at vm# criu dump -D . -t <pid-of-ns_child_exec> --shell-job --tcp-established 
> Error (namespaces.c:196): Can't dump nested pid namespace for 15022
> Error (namespaces.c:392): Can't make pidns id
> 
> so still trying to find the path-of-least-resistance here..
> 
> --Sowmini
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list