[RESEND,v3,7/7] Documentation: update RPC configuration file section

Submitted by Adrian Reber on July 10, 2018, 9:39 a.m.

Details

Message ID 1531215570-27770-7-git-send-email-adrian@lisas.de
State New
Series "Series without cover letter"
Headers show

Commit Message

Adrian Reber July 10, 2018, 9:39 a.m.
From: Adrian Reber <areber@redhat.com>

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

Patch hide | download patch | download mbox

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 1bb516c..4e87007 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -630,12 +630,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.
 
@@ -659,6 +663,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