Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Commit 3f234b1

Browse files
committed
Add auto-dedup flag for checkpoint/restore
When doing incremental dumps is useful to use auto deduplication of memory images to save space. Signed-off-by: Nikolas Sepos <[email protected]>
1 parent da4a5a9 commit 3f234b1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Diff for: checkpoint.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ checkpointed.`,
3535
cli.BoolFlag{Name: "pre-dump", Usage: "dump container's memory information only, leave the container running after this"},
3636
cli.StringFlag{Name: "manage-cgroups-mode", Value: "", Usage: "cgroups mode: 'soft' (default), 'full' and 'strict'"},
3737
cli.StringSliceFlag{Name: "empty-ns", Usage: "create a namespace, but don't restore its properties"},
38+
cli.BoolFlag{Name: "auto-dedup", Usage: "enable auto deduplication of memory images"},
3839
},
3940
Action: func(context *cli.Context) error {
4041
if err := checkArgs(context, 1, exactArgs); err != nil {

Diff for: restore.go

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ using the runc checkpoint command.`,
8282
Name: "empty-ns",
8383
Usage: "create a namespace, but don't restore its properties",
8484
},
85+
cli.BoolFlag{
86+
Name: "auto-dedup",
87+
Usage: "enable auto deduplication of memory images",
88+
},
8589
},
8690
Action: func(context *cli.Context) error {
8791
if err := checkArgs(context, 1, exactArgs); err != nil {
@@ -123,5 +127,6 @@ func criuOptions(context *cli.Context) *libcontainer.CriuOpts {
123127
ShellJob: context.Bool("shell-job"),
124128
FileLocks: context.Bool("file-locks"),
125129
PreDump: context.Bool("pre-dump"),
130+
AutoDedup: context.Bool("auto-dedup"),
126131
}
127132
}

0 commit comments

Comments
 (0)