diff options
author | Adrian Reber <areber@redhat.com> | 2018-08-01 19:31:22 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2018-10-30 19:27:57 +0300 |
commit | 99d52ec7dd4543010860bec50a187d93eaa72634 (patch) | |
tree | 3ced89464b711f5a075877cf12fd5d50881de7c3 /images/rpc.proto | |
parent | dabe778c38820448af9075162067f5dce41c3ab8 (diff) |
cr-service: add support for configuration files in RPC mode
With this commit it is possible to specify a configuration file via
RPC. In python this would look like this:
req.opts.config_file = 'path/to/config_file'
With this commit CRIU's configuration file handling works like this:
* apply_config(global_conf)
* apply_config(user_conf)
* apply_config(environment variable)
* apply_config(config file via CLI)
* apply_rpc_options() or apply_cli_options()
* apply_config(rpc_conf) (only for RPC)
This is at least (probably) the third iteration of the RPC configuration
file code and it still is complicated.
Most CRIU options are correctly used by just writing the new values to
the corresponding fields of the opts structure. For the RPC case there
are, however, a few options (output, work_dir, imgs_dir) which need
special handling.
So the RPC configuration file is parsed twice. First time to get output,
work_dir and imgs_dir. Once those are read and correctly used, the RPC
code overwrites all options again by values set by the RPC interface. At
the end the RPC configuration file is read a second time and finally
overwrites the values set via RPC.
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Diffstat (limited to 'images/rpc.proto')
-rw-r--r-- | images/rpc.proto | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/images/rpc.proto b/images/rpc.proto index 71f47d594..abf2f5d79 100644 --- a/images/rpc.proto +++ b/images/rpc.proto @@ -111,6 +111,7 @@ message criu_opts { optional bool lazy_pages = 48; optional int32 status_fd = 49; optional bool orphan_pts_master = 50; + optional string config_file = 51; } message criu_dump_resp { |