summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-03 19:56:03 +0200
committerGitHub <noreply@github.com>2020-04-03 19:56:03 +0200
commit3542700d6e7b630b2eeee8a0e20499bda3dafb03 (patch)
tree7bd9b0f5299557870569d73ade6da3340d154dd9 /libpod
parent416fd4846facad21f515ce7bfc67d18c16fe358f (diff)
parent001fe983dfd6e6ae3f58e1f9bb1f61c189c98f9c (diff)
downloadpodman-3542700d6e7b630b2eeee8a0e20499bda3dafb03.tar.gz
podman-3542700d6e7b630b2eeee8a0e20499bda3dafb03.tar.bz2
podman-3542700d6e7b630b2eeee8a0e20499bda3dafb03.zip
Merge pull request #5707 from adrianreber/crun-checkpoint-1
Prepare for crun checkpoint support
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci_conmon_linux.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 5fede3e7e..2e96dbe57 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -933,6 +933,13 @@ func (r *ConmonOCIRuntime) CheckpointContainer(ctr *Container, options Container
if options.TCPEstablished {
args = append(args, "--tcp-established")
}
+ runtimeDir, err := util.GetRuntimeDir()
+ if err != nil {
+ return err
+ }
+ if err = os.Setenv("XDG_RUNTIME_DIR", runtimeDir); err != nil {
+ return errors.Wrapf(err, "cannot set XDG_RUNTIME_DIR")
+ }
args = append(args, ctr.ID())
return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, nil, r.path, args...)
}
@@ -942,7 +949,7 @@ func (r *ConmonOCIRuntime) CheckpointContainer(ctr *Container, options Container
func (r *ConmonOCIRuntime) SupportsCheckpoint() bool {
// Check if the runtime implements checkpointing. Currently only
// runc's checkpoint/restore implementation is supported.
- cmd := exec.Command(r.path, "checkpoint", "-h")
+ cmd := exec.Command(r.path, "checkpoint", "--help")
if err := cmd.Start(); err != nil {
return false
}