[CRIU] [PATCH] Documentation: update RPC configuration file section

Radostin Stoyanov rstoyanov1 at gmail.com
Mon Aug 20 15:58:15 MSK 2018


On 02/08/18 14:33, Adrian Reber wrote:
> From: Adrian Reber <areber at redhat.com>
>
> Signed-off-by: Adrian Reber <areber at redhat.com>
> ---
>  Documentation/criu.txt | 38 ++++++++++++++++++++++++++++++++++----
>  1 file changed, 34 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/criu.txt b/Documentation/criu.txt
> index 609234bca..9d7b294b8 100644
> --- a/Documentation/criu.txt
> +++ b/Documentation/criu.txt
> @@ -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
s/parsed to/passed to/    (typo)
> +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.
>  
> @@ -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
s/criu/CRIU/   (for consistency)
> +should only be used carefully.*
> +
>  EXAMPLES
>  --------
>  To checkpoint a program with pid of *1234* and write all image files into



More information about the CRIU mailing list