Commit a853ccfb authored by Adrian Reber's avatar Adrian Reber Committed by Andrei Vagin

Documentation: update RPC configuration file section

Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 5f8ee105
...@@ -609,12 +609,25 @@ they are compatible with the ones present in an image file. ...@@ -609,12 +609,25 @@ they are compatible with the ones present in an image file.
CONFIGURATION FILES CONFIGURATION FILES
------------------- -------------------
Criu supports usage of configuration files to avoid the need of writing every *Criu* supports usage of configuration files to avoid the need of writing every
option on command line, which is useful especially with repeated usage of option on command line, which is useful especially with repeated usage of
same options. A specific configuration file can be passed with same options. A specific configuration file can be passed with
"*--config* 'file'" option. If no file is passed, default configuration files the "*--config* 'file'" option. If no file is passed, the default configuration
'/etc/criu/default.conf' and '$HOME/.criu/default.conf' are parsed (if files '/etc/criu/default.conf' and '$HOME/.criu/default.conf' are parsed (if
present on the system). Default configuration file parsing can be forbidden present on the system). If the environment variable CRIU_CONFIG_FILE is set,
it will also be parsed.
The options parsed to CRIU via CLI, RPC or configuration file are evaluated
in the following order:
- apply_config(/etc/criu/default.conf)
- apply_config($HOME/.criu/default.conf)
- apply_config(CRIU_CONFIG_FILE)
- apply_config(*--config* 'file')
- apply_config(CLI) or apply_config(RPC)
- apply_config(RPC configuration file) (only for RPC mode)
Default configuration file parsing can be deactivated
with "*--no-default-config*" if needed. Parsed configuration files are merged with "*--no-default-config*" if needed. Parsed configuration files are merged
with command line options, which allows overriding boolean options. with command line options, which allows overriding boolean options.
...@@ -638,6 +651,23 @@ work-dir "/home/USERNAME/criu/my \"work\" directory" ...@@ -638,6 +651,23 @@ work-dir "/home/USERNAME/criu/my \"work\" directory"
no-restore-sibling # this is another comment no-restore-sibling # this is another comment
--------------- ---------------
Configuration files in RPC mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Not only does *criu* evaluate configuration files in CLI mode, it also
evaluates configuration files in RPC mode. Just as in CLI mode the
configuration file values are evaluated first. This means that any option
set via RPC will overwrite the configuration file setting. The user can
thus change *criu*'s default behavior but it is not possible to change
settings which are explicitly set by the RPC client.
The RPC client can, however, specify an additional configuration file
which will be evaluated after the RPC options (see above for option evaluation
order). The RPC client can specify this additional configuration file
via "req.opts.config_file = '/path/to/file'". The values from this
configuration file will overwrite all other configuration file settings
or RPC options. *This can lead to undesired behavior of criu and
should only be used carefully.*
EXAMPLES EXAMPLES
-------- --------
To checkpoint a program with pid of *1234* and write all image files into To checkpoint a program with pid of *1234* and write all image files into
......
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