[CRIU] p.haul: migrating process with TCP connection established

Pavel Emelyanov xemul at parallels.com
Wed Apr 9 08:44:23 PDT 2014


On 04/09/2014 07:26 PM, Oscar Fernández wrote:
> Hi all,
> I'm trying to migrate a process which has a TCP connection established. This process is the server side of a simple server-client TCP program.
> 
> First of all I tried to dump and restore it using CRIU and it worked fine thanks to --tcp-established option.
> 
> Now I want to move that process to another machine, so I'm using p.haul this time, but it fails on process restoration.

Can you show the command you're doing it with?

> The content of criu_restore.log is:
> 
> 3741: Error (sk-inet.c:514): Connected TCP socket in image
> Error (cr-restore.c:1036): 3741 exited, status=255
> Error (cr-restore.c:1579): Restoring FAILED.

There's a -v<N> option to the p.haul that increases verbosity,
it will give us more info :)

> Is this feature available on p.haul? Do I have to use some special options for tcp connections as well
> as criu does with --tcp-established?

Well, in p.haul we have a concept of "hauler driver" -- this is a helper class, that
known what we're migrating. Currently there are three drivers -- ovz, lxc and pid, that
migrate openvz container, lxc container and just a process tree respectively.

When deciding whether or not to live-migrate a tcp connection, p.haul asks a driver
whether it can handle it, by properly locking and unlocking network during migration.
At the moment this ability is implemented in the openvz driver only. If you're using 
the pid driver, it will be (in theory) possible to handle this, but more work will 
be required.

Thanks,
Pavel


More information about the CRIU mailing list