diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-23 13:16:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 13:16:10 +0100 |
commit | fbdfd55e2d58484edd2e56b85f50086746e80314 (patch) | |
tree | 59209932c32836b968966cb2f72e66acbb8ce8a3 /cmd | |
parent | 1b9a5964dbb25f8c3cf2b530ffba52325cc81678 (diff) | |
parent | d669dbfb9fbb4bae56ba90ce9b58352c793eff6e (diff) | |
download | podman-fbdfd55e2d58484edd2e56b85f50086746e80314.tar.gz podman-fbdfd55e2d58484edd2e56b85f50086746e80314.tar.bz2 podman-fbdfd55e2d58484edd2e56b85f50086746e80314.zip |
Merge pull request #12672 from adrianreber/2021-12-21-check-for-memtrack
Error out early if system does not support pre-copy checkpointing
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/checkpoint.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/containers/checkpoint.go b/cmd/podman/containers/checkpoint.go index e8dd25978..43a1b75e5 100644 --- a/cmd/podman/containers/checkpoint.go +++ b/cmd/podman/containers/checkpoint.go @@ -11,6 +11,7 @@ import ( "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/cmd/podman/utils" "github.com/containers/podman/v3/cmd/podman/validate" + "github.com/containers/podman/v3/pkg/criu" "github.com/containers/podman/v3/pkg/domain/entities" "github.com/containers/podman/v3/pkg/rootless" "github.com/containers/storage/pkg/archive" @@ -113,6 +114,9 @@ func checkpoint(cmd *cobra.Command, args []string) error { if checkpointOptions.WithPrevious && checkpointOptions.PreCheckPoint { return errors.Errorf("--with-previous can not be used with --pre-checkpoint") } + if (checkpointOptions.WithPrevious || checkpointOptions.PreCheckPoint) && !criu.MemTrack() { + return errors.New("system (architecture/kernel/CRIU) does not support memory tracking") + } responses, err := registry.ContainerEngine().ContainerCheckpoint(context.Background(), args, checkpointOptions) if err != nil { return err |