diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-05 03:57:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 03:57:17 -0500 |
commit | 05080a12a998802570ee123a39368a0fe97e2fd2 (patch) | |
tree | e2828a62966c6d05e2d79cb7cc90ae3254279657 /libpod/container_internal.go | |
parent | 4e5cc6a3a61d9d2f1d3b97fc10684ec5617816ab (diff) | |
parent | a090301bbb10424ce4f99e40c97959f0e8664718 (diff) | |
download | podman-05080a12a998802570ee123a39368a0fe97e2fd2.tar.gz podman-05080a12a998802570ee123a39368a0fe97e2fd2.tar.bz2 podman-05080a12a998802570ee123a39368a0fe97e2fd2.zip |
Merge pull request #9593 from vrothberg/cp-tmp
podman cp: support copying on tmpfs mounts
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 7e8226de4..a7da7f395 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -2086,6 +2086,10 @@ func (c *Container) setupOCIHooks(ctx context.Context, config *spec.Spec) (map[s // mount mounts the container's root filesystem func (c *Container) mount() (string, error) { + if c.state.State == define.ContainerStateRemoving { + return "", errors.Wrapf(define.ErrCtrStateInvalid, "cannot mount container %s as it is being removed", c.ID()) + } + mountPoint, err := c.runtime.storageService.MountContainerImage(c.ID()) if err != nil { return "", errors.Wrapf(err, "error mounting storage for container %s", c.ID()) |