Skip to content

Commit

Permalink
Documentation: update RPC configuration file section
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
  • Loading branch information
adrianreber authored and avagin committed Oct 30, 2018
1 parent 5f8ee10 commit a853ccf
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions Documentation/criu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -609,12 +609,25 @@ they are compatible with the ones present in an image file.

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
same options. A specific configuration file can be passed with
"*--config* 'file'" option. If no file is passed, default configuration files
'/etc/criu/default.conf' and '$HOME/.criu/default.conf' are parsed (if
present on the system). Default configuration file parsing can be forbidden
the "*--config* 'file'" option. If no file is passed, the default configuration
files '/etc/criu/default.conf' and '$HOME/.criu/default.conf' are parsed (if
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 command line options, which allows overriding boolean options.

Expand All @@ -638,6 +651,23 @@ work-dir "/home/USERNAME/criu/my \"work\" directory"
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
--------
To checkpoint a program with pid of *1234* and write all image files into
Expand Down

0 comments on commit a853ccf

Please sign in to comment.