podman/libpod/container_internal_unsupported.go
Matthew Heon b6a7d88397 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>
2019-10-10 14:53:29 -04:00

51 lines
1.1 KiB
Go

// +build !linux
package libpod
import (
"context"
"github.com/containers/libpod/libpod/define"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
func (c *Container) mountSHM(shmOptions string) error {
return define.ErrNotImplemented
}
func (c *Container) unmountSHM(mount string) error {
return define.ErrNotImplemented
}
func (c *Container) prepare() (err error) {
return define.ErrNotImplemented
}
func (c *Container) cleanupNetwork() error {
return define.ErrNotImplemented
}
func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
return nil, define.ErrNotImplemented
}
func (c *Container) checkpoint(ctx context.Context, options ContainerCheckpointOptions) error {
return define.ErrNotImplemented
}
func (c *Container) restore(ctx context.Context, options ContainerCheckpointOptions) error {
return define.ErrNotImplemented
}
func (c *Container) copyOwnerAndPerms(source, dest string) error {
return nil
}
func (c *Container) refreshCNI() error {
return define.ErrNotImplemented
}
func (c *Container) getOCICgroupPath() (string, error) {
return "", define.ErrNotImplemented
}