criu: add RPC interface for skip in-flight connections

For the previously added option to skip in-flight connections this adds
that option to the RPC interface. The skip in-flight connections is also
described in criu.txt.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Adrian Reber 2016-06-20 23:15:00 +03:00 committed by Pavel Emelyanov
parent d04021969e
commit ed8fecd12d
5 changed files with 24 additions and 0 deletions

View file

@ -199,6 +199,13 @@ Thus for command line argument the example above will look like:
*--tcp-established*::
Checkpoint established TCP connections.
*--skip-in-flight*::
This option skips in-flight TCP connections. If TCP connections
are found which are not yet completely established, criu will
ignore these connections in favor of erroring out.
The TCP stack on the client side is expected to handle the
re-connect gracefully.
*--veth-pair* '<IN>'*=*'<OUT>'::
Correspondence between outside and inside names of veth devices.

View file

@ -322,6 +322,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
if (req->has_tcp_established)
opts.tcp_established_ok = req->tcp_established;
if (req->has_tcp_skip_in_flight)
opts.tcp_skip_in_flight = req->tcp_skip_in_flight;
if (req->has_evasive_devices)
opts.evasive_devices = req->evasive_devices;

View file

@ -104,6 +104,7 @@ message criu_opts {
optional string freeze_cgroup = 44;
optional uint32 timeout = 45;
optional bool tcp_skip_in_flight = 46;
}
message criu_dump_resp {

View file

@ -309,6 +309,17 @@ void criu_set_tcp_established(bool tcp_established)
criu_local_set_tcp_established(global_opts, tcp_established);
}
void criu_local_set_tcp_skip_in_flight(criu_opts *opts, bool tcp_skip_in_flight)
{
opts->rpc->has_tcp_skip_in_flight = true;
opts->rpc->tcp_skip_in_flight = tcp_skip_in_flight;
}
void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight)
{
criu_local_set_tcp_skip_in_flight(global_opts, tcp_skip_in_flight);
}
void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices)
{
opts->rpc->has_evasive_devices = true;

View file

@ -65,6 +65,7 @@ void criu_set_leave_running(bool leave_running);
void criu_set_ext_unix_sk(bool ext_unix_sk);
int criu_add_unix_sk(unsigned int inode);
void criu_set_tcp_established(bool tcp_established);
void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight);
void criu_set_evasive_devices(bool evasive_devices);
void criu_set_shell_job(bool shell_job);
void criu_set_file_locks(bool file_locks);
@ -169,6 +170,7 @@ void criu_local_set_leave_running(criu_opts *opts, bool leave_running);
void criu_local_set_ext_unix_sk(criu_opts *opts, bool ext_unix_sk);
int criu_local_add_unix_sk(criu_opts *opts, unsigned int inode);
void criu_local_set_tcp_established(criu_opts *opts, bool tcp_established);
void criu_local_set_tcp_skip_in_flight(criu_opts *opts, bool tcp_skip_in_flight);
void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices);
void criu_local_set_shell_job(criu_opts *opts, bool shell_job);
void criu_local_set_file_locks(criu_opts *opts, bool file_locks);