diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-11-18 21:57:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 21:57:16 +0100 |
commit | b24110ea568e07e76be5a8df2443767494d6490c (patch) | |
tree | 6ad5b6e5099df507ff1cf1bff64624224f0a8879 /libpod | |
parent | 0376e6092c850435b4740876045fdccb467cafd8 (diff) | |
parent | 7098463e7808c4a59c5a6404127ffad0863625b1 (diff) | |
download | podman-b24110ea568e07e76be5a8df2443767494d6490c.tar.gz podman-b24110ea568e07e76be5a8df2443767494d6490c.tar.bz2 podman-b24110ea568e07e76be5a8df2443767494d6490c.zip |
Merge pull request #12333 from rst0git/file-locks
Add --file-locks checkpoint/restore option
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_api.go | 3 | ||||
-rw-r--r-- | libpod/oci_conmon_linux.go | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index a41bb03df..7ae9f497c 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -798,6 +798,9 @@ type ContainerCheckpointOptions struct { // how much time each component in the stack requires to // checkpoint a container. PrintStats bool + // FileLocks tells the API to checkpoint/restore a container + // with file-locks + FileLocks bool } // Checkpoint checkpoints a container diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 533a0d78b..e007d0b92 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -794,6 +794,9 @@ func (r *ConmonOCIRuntime) CheckpointContainer(ctr *Container, options Container if options.TCPEstablished { args = append(args, "--tcp-established") } + if options.FileLocks { + args = append(args, "--file-locks") + } if !options.PreCheckPoint && options.KeepRunning { args = append(args, "--leave-running") } @@ -1101,6 +1104,9 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co if restoreOptions.TCPEstablished { args = append(args, "--runtime-opt", "--tcp-established") } + if restoreOptions.FileLocks { + args = append(args, "--runtime-opt", "--file-locks") + } if restoreOptions.Pod != "" { mountLabel := ctr.config.MountLabel processLabel := ctr.config.ProcessLabel |