diff --git a/checkpoint.go b/checkpoint.go index ffc26a5f3..afd515abd 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -31,6 +31,8 @@ checkpointed.`, cli.StringFlag{Name: "parent-path", Value: "", Usage: "path for previous criu image files in pre-dump"}, cli.BoolFlag{Name: "leave-running", Usage: "leave the process running after checkpointing"}, cli.BoolFlag{Name: "tcp-established", Usage: "allow open tcp connections"}, + cli.BoolFlag{Name: "tcp-skip-in-flight", Usage: "skip in-flight tcp connections"}, + cli.BoolFlag{Name: "link-remap", Usage: "allow one to link unlinked files back when possible"}, cli.BoolFlag{Name: "ext-unix-sk", Usage: "allow external unix sockets"}, cli.BoolFlag{Name: "shell-job", Usage: "allow shell jobs"}, cli.BoolFlag{Name: "lazy-pages", Usage: "use userfaultfd to lazily restore memory pages"}, @@ -122,6 +124,8 @@ func criuOptions(context *cli.Context) (*libcontainer.CriuOpts, error) { ParentImage: parentPath, LeaveRunning: context.Bool("leave-running"), TcpEstablished: context.Bool("tcp-established"), + TcpSkipInFlight: context.Bool("tcp-skip-in-flight"), + LinkRemap: context.Bool("link-remap"), ExternalUnixConnections: context.Bool("ext-unix-sk"), ShellJob: context.Bool("shell-job"), FileLocks: context.Bool("file-locks"), diff --git a/contrib/completions/bash/runc b/contrib/completions/bash/runc index 353c8ffdb..38945bf07 100644 --- a/contrib/completions/bash/runc +++ b/contrib/completions/bash/runc @@ -507,6 +507,8 @@ _runc_checkpoint() { -h --leave-running --tcp-established + --tcp-skip-in-flight + --link-remap --ext-unix-sk --shell-job --lazy-pages diff --git a/libcontainer/criu_linux.go b/libcontainer/criu_linux.go index ed08f5f40..4d2fa0569 100644 --- a/libcontainer/criu_linux.go +++ b/libcontainer/criu_linux.go @@ -327,6 +327,8 @@ func (c *Container) Checkpoint(criuOpts *CriuOpts) error { ShellJob: proto.Bool(criuOpts.ShellJob), LeaveRunning: proto.Bool(criuOpts.LeaveRunning), TcpEstablished: proto.Bool(criuOpts.TcpEstablished), + TcpSkipInFlight: proto.Bool(criuOpts.TcpSkipInFlight), + LinkRemap: proto.Bool(criuOpts.LinkRemap), ExtUnixSk: proto.Bool(criuOpts.ExternalUnixConnections), FileLocks: proto.Bool(criuOpts.FileLocks), EmptyNs: proto.Uint32(criuOpts.EmptyNs), diff --git a/libcontainer/criu_opts_linux.go b/libcontainer/criu_opts_linux.go index f26df7d8d..67e5e3967 100644 --- a/libcontainer/criu_opts_linux.go +++ b/libcontainer/criu_opts_linux.go @@ -16,6 +16,8 @@ type CriuOpts struct { ParentImage string // directory for storing parent image files in pre-dump and dump LeaveRunning bool // leave container in running state after checkpoint TcpEstablished bool // checkpoint/restore established TCP connections + TcpSkipInFlight bool // skip in-flight TCP connections + LinkRemap bool // allow one to link unlinked files back when possible ExternalUnixConnections bool // allow external unix connections ShellJob bool // allow to dump and restore shell jobs FileLocks bool // handle file locks, for safety diff --git a/man/runc-checkpoint.8.md b/man/runc-checkpoint.8.md index a7dad29d3..78da7578f 100644 --- a/man/runc-checkpoint.8.md +++ b/man/runc-checkpoint.8.md @@ -28,6 +28,14 @@ image files directory. : Allow checkpoint/restore of established TCP connections. See [criu --tcp-establised option](https://criu.org/CLI/opt/--tcp-established). +**--tcp-skip-in-flight** +: Skip in-flight TCP connections. See +[criu --skip-in-flight option](https://criu.org/CLI/opt/--skip-in-flight). + +**--link-remap** +: Allow one to link unlinked files back when possible. See +[criu --link-remap option](https://criu.org/CLI/opt/--link-remap). + **--ext-unix-sk** : Allow checkpoint/restore of external unix sockets. See [criu --ext-unix-sk option](https://criu.org/CLI/opt/--ext-unix-sk).