Documentation: update RPC configuration file section

Submitted by Adrian Reber on Aug. 2, 2018, 1:33 p.m.

Details

Message ID 20180802133328.20750-1-adrian@lisas.de
State Rejected
Series "Documentation: update RPC configuration file section"
Headers show

Commit Message

Adrian Reber Aug. 2, 2018, 1:33 p.m.
From: Adrian Reber <areber@redhat.com>

Signed-off-by: Adrian Reber <areber@redhat.com>
---
 Documentation/criu.txt | 38 ++++++++++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

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

Comments

Andrey Vagin Aug. 16, 2018, 11:40 p.m.
Applied, thanks

On Thu, Aug 02, 2018 at 01:33:28PM +0000, Adrian Reber wrote:
> From: Adrian Reber <areber@redhat.com>
> 
> Signed-off-by: Adrian Reber <areber@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
>
Adrian Reber Aug. 17, 2018, 4:49 p.m.
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@redhat.com>
> > 
> > Signed-off-by: Adrian Reber <areber@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
Radostin Stoyanov Aug. 20, 2018, 12:58 p.m.
On 02/08/18 14:33, Adrian Reber wrote:
> From: Adrian Reber <areber@redhat.com>
>
> Signed-off-by: Adrian Reber <areber@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