Commit ed8fecd1 authored by Adrian Reber's avatar Adrian Reber Committed by Pavel Emelyanov

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: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d0402196
...@@ -199,6 +199,13 @@ Thus for command line argument the example above will look like: ...@@ -199,6 +199,13 @@ Thus for command line argument the example above will look like:
*--tcp-established*:: *--tcp-established*::
Checkpoint established TCP connections. 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>':: *--veth-pair* '<IN>'*=*'<OUT>'::
Correspondence between outside and inside names of veth devices. Correspondence between outside and inside names of veth devices.
......
...@@ -322,6 +322,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req) ...@@ -322,6 +322,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
if (req->has_tcp_established) if (req->has_tcp_established)
opts.tcp_established_ok = req->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) if (req->has_evasive_devices)
opts.evasive_devices = req->evasive_devices; opts.evasive_devices = req->evasive_devices;
......
...@@ -104,6 +104,7 @@ message criu_opts { ...@@ -104,6 +104,7 @@ message criu_opts {
optional string freeze_cgroup = 44; optional string freeze_cgroup = 44;
optional uint32 timeout = 45; optional uint32 timeout = 45;
optional bool tcp_skip_in_flight = 46;
} }
message criu_dump_resp { message criu_dump_resp {
......
...@@ -309,6 +309,17 @@ void criu_set_tcp_established(bool tcp_established) ...@@ -309,6 +309,17 @@ void criu_set_tcp_established(bool tcp_established)
criu_local_set_tcp_established(global_opts, 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) void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices)
{ {
opts->rpc->has_evasive_devices = true; opts->rpc->has_evasive_devices = true;
......
...@@ -65,6 +65,7 @@ void criu_set_leave_running(bool leave_running); ...@@ -65,6 +65,7 @@ void criu_set_leave_running(bool leave_running);
void criu_set_ext_unix_sk(bool ext_unix_sk); void criu_set_ext_unix_sk(bool ext_unix_sk);
int criu_add_unix_sk(unsigned int inode); int criu_add_unix_sk(unsigned int inode);
void criu_set_tcp_established(bool tcp_established); 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_evasive_devices(bool evasive_devices);
void criu_set_shell_job(bool shell_job); void criu_set_shell_job(bool shell_job);
void criu_set_file_locks(bool file_locks); void criu_set_file_locks(bool file_locks);
...@@ -169,6 +170,7 @@ void criu_local_set_leave_running(criu_opts *opts, bool leave_running); ...@@ -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); 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); 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_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_evasive_devices(criu_opts *opts, bool evasive_devices);
void criu_local_set_shell_job(criu_opts *opts, bool shell_job); void criu_local_set_shell_job(criu_opts *opts, bool shell_job);
void criu_local_set_file_locks(criu_opts *opts, bool file_locks); void criu_local_set_file_locks(criu_opts *opts, bool file_locks);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment