[CRIU] [PATCH v3 7/7] Documentation: update RPC configuration file section

Adrian Reber adrian at lisas.de
Thu Jun 28 19:02:34 MSK 2018


From: Adrian Reber <areber at redhat.com>

Signed-off-by: Adrian Reber <areber at redhat.com>
---
 Documentation/criu.txt | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index db77bfe..a7a2136 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -624,12 +624,16 @@ 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
+present on the system). If the environment variable CRIU_CONFIG_FILE is set,
+its value will override the default configuration file location and the
+"*--config* 'file'" option.
+
+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.
 
@@ -653,6 +657,29 @@ 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.
+
+To enable users to still change the RPC client's behavior the RPC client
+can explicitly tell *criu* that it accepts changes to *criu*\'s behavior
+from the configuration file. In the RPC request the RPC client has to
+set "opts.prefer_config_file=True". With this the user can change *criu*'s
+behavior in RPC mode. *This can lead to undesired behavior of criu and
+should only be used carefully.*
+
+It is not possible to use the CLI option "*--config* 'file'" in RPC mode
+and if the RPC client wants to use a non-default location configuration
+file this can be achieved with the CRIU_CONFIG_FILE environment variable.
+If set the file from the environment variable will be used instead of
+the default configuration files.
+
+
 EXAMPLES
 --------
 To checkpoint a program with pid of *1234* and write all image files into
-- 
1.8.3.1



More information about the CRIU mailing list