2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

rpc: Add interface for @timeout option

Needed for container migration, where arguments are
set via p.haul as rpc request.

Signed-off-by: Nikita Spiridonov <nspiridonov@virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Nikita Spiridonov
2016-06-17 14:22:00 +03:00
committed by Pavel Emelyanov
parent d7f9e824d3
commit 788a74cecc
4 changed files with 16 additions and 0 deletions

View File

@@ -457,6 +457,9 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
if (req->freeze_cgroup)
opts.freeze_cgroup = req->freeze_cgroup;
if (req->has_timeout)
opts.timeout = req->timeout;
if (req->cgroup_props)
opts.cgroup_props = req->cgroup_props;

View File

@@ -103,6 +103,7 @@ message criu_opts {
repeated string cgroup_dump_controller = 43;
optional string freeze_cgroup = 44;
optional uint32 timeout = 45;
}
message criu_dump_resp {

View File

@@ -395,6 +395,16 @@ void criu_set_freeze_cgroup(char *name)
criu_local_set_freeze_cgroup(global_opts, name);
}
void criu_local_set_timeout(criu_opts *opts, unsigned int timeout)
{
opts->rpc->timeout = timeout;
}
void criu_set_timeout(unsigned int timeout)
{
criu_local_set_timeout(global_opts, timeout);
}
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val)
{
opts->rpc->has_auto_ext_mnt = true;

View File

@@ -79,6 +79,7 @@ void criu_set_root(char *root);
void criu_set_manage_cgroups(bool manage);
void criu_set_manage_cgroups_mode(enum criu_cg_mode mode);
void criu_set_freeze_cgroup(char *name);
void criu_set_timeout(unsigned int timeout);
void criu_set_auto_ext_mnt(bool val);
void criu_set_ext_sharing(bool val);
void criu_set_ext_masters(bool val);
@@ -182,6 +183,7 @@ void criu_local_set_root(criu_opts *opts, char *root);
void criu_local_set_manage_cgroups(criu_opts *opts, bool manage);
void criu_local_set_manage_cgroups_mode(criu_opts *opts, enum criu_cg_mode mode);
void criu_local_set_freeze_cgroup(criu_opts *opts, char *name);
void criu_local_set_timeout(criu_opts *opts, unsigned int timeout);
void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val);
void criu_local_set_ext_sharing(criu_opts *opts, bool val);
void criu_local_set_ext_masters(criu_opts *opts, bool val);