diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-10-10 14:45:56 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-10-10 14:53:29 -0400 |
commit | b6a7d88397c95a9f3a462274a890b65faafd4d7a (patch) | |
tree | 416ad704a77831173316325672f932ef1246e9ce /libpod/container_internal_unsupported.go | |
parent | 6f630bc09b3e937fe3ddc4a829715bacd5b6c779 (diff) | |
download | podman-b6a7d88397c95a9f3a462274a890b65faafd4d7a.tar.gz podman-b6a7d88397c95a9f3a462274a890b65faafd4d7a.tar.bz2 podman-b6a7d88397c95a9f3a462274a890b65faafd4d7a.zip |
When restoring containers, reset cgroup path
Previously, `podman checkport restore` with exported containers,
when told to create a new container based on the exported
checkpoint, would create a new container, with a new container
ID, but not reset CGroup path - which contained the ID of the
original container.
If this was done multiple times, the result was two containers
with the same cgroup paths. Operations on these containers would
this have a chance of crossing over to affect the other one; the
most notable was `podman rm` once it was changed to use the --all
flag when stopping the container; all processes in the cgroup,
including the ones in the other container, would be stopped.
Reset cgroups on restore to ensure that the path matches the ID
of the container actually being run.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_internal_unsupported.go')
-rw-r--r-- | libpod/container_internal_unsupported.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_internal_unsupported.go b/libpod/container_internal_unsupported.go index 05a587c59..4abaa6362 100644 --- a/libpod/container_internal_unsupported.go +++ b/libpod/container_internal_unsupported.go @@ -44,3 +44,7 @@ func (c *Container) copyOwnerAndPerms(source, dest string) error { func (c *Container) refreshCNI() error { return define.ErrNotImplemented } + +func (c *Container) getOCICgroupPath() (string, error) { + return "", define.ErrNotImplemented +} |