Skip to content

Commit 8011af4

Browse files
Merge pull request #1964 from adrianreber/org.criu
Document 'org.criu.config' annotation
2 parents c1e454b + dd50c7e commit 8011af4

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

docs/checkpoint-restore.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Checkpoint and Restore #
2+
3+
For a basic description about checkpointing and restoring containers with
4+
`runc` please see [runc-checkpoint(8)](../man/runc-checkpoint.8.md) and
5+
[runc-restore(8)](../man/runc-restore.8.md).
6+
7+
## Checkpoint/Restore Annotations ##
8+
9+
In addition to specifying options on the command-line like it is described
10+
in the man-pages (see above), it is also possible to influence CRIU's
11+
behaviour using CRIU configuration files. For details about CRIU's
12+
configuration file support please see [CRIU's wiki](https://criu.org/Configuration_files).
13+
14+
In addition to CRIU's default configuration files `runc` tells CRIU to
15+
also evaluate the file `/etc/criu/runc.conf`. Using the annotation
16+
`org.criu.config` it is, however, possible to change this additional
17+
CRIU configuration file.
18+
19+
If the annotation `org.criu.config` is set to an empty string `runc`
20+
will not pass any additional configuration file to CRIU. With an empty
21+
string it is therefore possible to disable the additional CRIU configuration
22+
file. This can be used to make sure that no additional configuration file
23+
changes CRIU's behaviour accidentally.
24+
25+
If the annotation `org.criu.config` is set to a non-empty string `runc` will
26+
pass that string to CRIU to be evaluated as an additional configuration file.
27+
If CRIU cannot open this additional configuration file, it will ignore this
28+
file and continue.
29+
30+
### Annotation Example to disable additional CRIU configuration file ###
31+
32+
```
33+
{
34+
"ociVersion": "1.0.0",
35+
"annotations": {
36+
"org.criu.config": ""
37+
},
38+
"process": {
39+
```
40+
41+
### Annotation Example to set a specific CRIU configuration file ###
42+
43+
```
44+
{
45+
"ociVersion": "1.0.0",
46+
"annotations": {
47+
"org.criu.config": "/etc/special-runc-criu-options"
48+
},
49+
"process": {
50+
```

man/runc-checkpoint.8.md

+3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ checkpointed.
1818
--tcp-established allow open tcp connections
1919
--ext-unix-sk allow external unix sockets
2020
--shell-job allow shell jobs
21+
--lazy-pages use userfaultfd to lazily restore memory pages
22+
--status-fd value criu writes \0 to this FD once lazy-pages is ready
2123
--page-server value ADDRESS:PORT of the page server
2224
--file-locks handle file locks, for safety
2325
--pre-dump dump container's memory information only, leave the container running after this
2426
--manage-cgroups-mode value cgroups mode: 'soft' (default), 'full' and 'strict'
2527
--empty-ns value create a namespace, but don't restore its properties
28+
--auto-dedup enable auto deduplication of memory images

0 commit comments

Comments
 (0)