summaryrefslogtreecommitdiff
path: root/libpod/oci_conmon_linux.go
diff options
context:
space:
mode:
authorRadostin Stoyanov <radostin@redhat.com>2021-11-17 11:53:12 +0000
committerRadostin Stoyanov <radostin@redhat.com>2021-11-18 19:23:25 +0000
commit6d23ea60d255b750a8e221cb9964f552218d4297 (patch)
treea2e207973ec2314a550147a3feb1d12c3810ad4a /libpod/oci_conmon_linux.go
parent0376e6092c850435b4740876045fdccb467cafd8 (diff)
downloadpodman-6d23ea60d255b750a8e221cb9964f552218d4297.tar.gz
podman-6d23ea60d255b750a8e221cb9964f552218d4297.tar.bz2
podman-6d23ea60d255b750a8e221cb9964f552218d4297.zip
Add --file-locks checkpoint/restore option
CRIU supports checkpoint/restore of file locks. This feature is required to checkpoint/restore containers running applications such as MySQL. Signed-off-by: Radostin Stoyanov <radostin@redhat.com>
Diffstat (limited to 'libpod/oci_conmon_linux.go')
-rw-r--r--libpod/oci_conmon_linux.go6
1 files changed, 6 insertions, 0 deletions
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