diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-03-19 22:09:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-19 22:09:40 +0100 |
commit | aa6c8c2e55a7de14fb22f89af14d5c0636eecee0 (patch) | |
tree | 20bb10c738de05c0e323c9ac737d8a7bd5c184f2 /libpod/runtime_ctr.go | |
parent | c1ff17acfa647c62fcb8ca6b8f3d15ff45100fb0 (diff) | |
parent | e89c6382ae26b6d611106360fdba4f3f304e5616 (diff) | |
download | podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.tar.gz podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.tar.bz2 podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.zip |
Merge pull request #5088 from mheon/begin_exec_rework
Begin exec rework
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 1f1cdc271..0b18436ca 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -463,11 +463,9 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool, } } - // Check that all of our exec sessions have finished - for _, session := range c.state.ExecSessions { - if err := c.ociRuntime.ExecStopContainer(c, session.ID, c.StopTimeout()); err != nil { - return errors.Wrapf(err, "error stopping exec session %s of container %s", session.ID, c.ID()) - } + // Remove all active exec sessions + if err := c.removeAllExecSessions(); err != nil { + return err } // Check that no other containers depend on the container. @@ -484,9 +482,8 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool, } } - // Set ContainerStateRemoving and remove exec sessions + // Set ContainerStateRemoving c.state.State = define.ContainerStateRemoving - c.state.ExecSessions = nil if err := c.save(); err != nil { return errors.Wrapf(err, "unable to set container %s removing state in database", c.ID()) |