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

Adrian Reber adrian at lisas.de
Fri Aug 17 19:49:09 MSK 2018


I do not see it in the criu-dev branch yet.

		Adrian

On Thu, Aug 16, 2018 at 04:40:14PM -0700, Andrei Vagin wrote:
> Applied, thanks
> 
> On Thu, Aug 02, 2018 at 01:33:28PM +0000, 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
> > +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
> > +should only be used carefully.*
> > +
> >  EXAMPLES
> >  --------
> >  To checkpoint a program with pid of *1234* and write all image files into
> > -- 
> > 2.18.0


More information about the CRIU mailing list