diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-07-28 14:48:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 14:48:28 +0200 |
commit | 6c5966cf3cbfa15602ba2d9ef57284f2669a321d (patch) | |
tree | 452db7496ba00a2e0da6ff4fce77b27a93fa7c12 /pkg/criu | |
parent | a5de8314188d7376f645d8ac6c6f7a6f685b6a45 (diff) | |
parent | 60b9e8c0da683d253f3828f00442fc5a75540368 (diff) | |
download | podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.tar.gz podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.tar.bz2 podman-6c5966cf3cbfa15602ba2d9ef57284f2669a321d.zip |
Merge pull request #10910 from adrianreber/2021-07-12-checkpoint-restore-into-pod
Add support for checkpoint/restore into and out of pods
Diffstat (limited to 'pkg/criu')
-rw-r--r-- | pkg/criu/criu.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/criu/criu.go b/pkg/criu/criu.go index f4cce238a..2a6805979 100644 --- a/pkg/criu/criu.go +++ b/pkg/criu/criu.go @@ -1,17 +1,21 @@ package criu import ( - "github.com/checkpoint-restore/go-criu" + "github.com/checkpoint-restore/go-criu/v5" ) // MinCriuVersion for Podman at least CRIU 3.11 is required const MinCriuVersion = 31100 +// PodCriuVersion is the version of CRIU needed for +// checkpointing and restoring containers out of and into Pods. +const PodCriuVersion = 31600 + // CheckForCriu uses CRIU's go bindings to check if the CRIU // binary exists and if it at least the version Podman needs. -func CheckForCriu() bool { +func CheckForCriu(version int) bool { c := criu.MakeCriu() - result, err := c.IsCriuAtLeast(MinCriuVersion) + result, err := c.IsCriuAtLeast(version) if err != nil { return false } |