mirror of
https://github.com/opencontainers/runc.git
synced 2025-04-18 19:44:09 +03:00
expose criu options for link remap and skip in flight
Signed-off-by: Daniel Levi-Minzi <dleviminzi@gmail.com>
This commit is contained in:
parent
e0e22d33ea
commit
1d047e44ed
@ -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"),
|
||||
|
@ -507,6 +507,8 @@ _runc_checkpoint() {
|
||||
-h
|
||||
--leave-running
|
||||
--tcp-established
|
||||
--tcp-skip-in-flight
|
||||
--link-remap
|
||||
--ext-unix-sk
|
||||
--shell-job
|
||||
--lazy-pages
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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).
|
||||
|
Loading…
x
Reference in New Issue
Block a user