diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-11-29 11:21:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-29 11:21:22 +0100 |
commit | 1bf9b27a22b0020f9af9f2795ee900e47a6e355f (patch) | |
tree | b5c48de998e469a17ca94788db81bceb0a289865 /libpod | |
parent | aa95726c98385fb75bc70b6de7a86c09ed74abd5 (diff) | |
parent | 5e43c7cde1da185f3a9dc4f949e778b087d4ea42 (diff) | |
download | podman-1bf9b27a22b0020f9af9f2795ee900e47a6e355f.tar.gz podman-1bf9b27a22b0020f9af9f2795ee900e47a6e355f.tar.bz2 podman-1bf9b27a22b0020f9af9f2795ee900e47a6e355f.zip |
Merge pull request #4594 from adrianreber/master
Disable checkpointing of containers started with --rm
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal_linux.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 2ecd5911a..f051f40e9 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -676,6 +676,10 @@ func (c *Container) checkpoint(ctx context.Context, options ContainerCheckpointO return errors.Wrapf(define.ErrCtrStateInvalid, "%q is not running, cannot checkpoint", c.state.State) } + if c.AutoRemove() && options.TargetFile == "" { + return errors.Errorf("Cannot checkpoint containers that have been started with '--rm' unless '--export' is used") + } + if err := c.checkpointRestoreLabelLog("dump.log"); err != nil { return err } |