diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-29 06:44:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 06:44:21 +0000 |
commit | 4608b8b98f584d1615bc7c6d1046a579ef0edd2b (patch) | |
tree | f519f4ca23a86b8cbb0a5ac84370ce8148ca6b29 | |
parent | 653e87dd4c6103e91724e5aa6afa4c78c2ae1922 (diff) | |
parent | 1affceb29f197b0c3dca13391b8eef36e39a175b (diff) | |
download | podman-4608b8b98f584d1615bc7c6d1046a579ef0edd2b.tar.gz podman-4608b8b98f584d1615bc7c6d1046a579ef0edd2b.tar.bz2 podman-4608b8b98f584d1615bc7c6d1046a579ef0edd2b.zip |
Merge pull request #14765 from giuseppe/unpause-before-kill
runtime: unpause the container before killing it
-rw-r--r-- | libpod/runtime_ctr.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 459514d47..fafec5e12 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -664,9 +664,6 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo } if c.state.State == define.ContainerStatePaused { - if err := c.ociRuntime.KillContainer(c, 9, false); err != nil { - return err - } isV2, err := cgroups.IsCgroup2UnifiedMode() if err != nil { return err @@ -677,6 +674,9 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo return err } } + if err := c.ociRuntime.KillContainer(c, 9, false); err != nil { + return err + } // Need to update container state to make sure we know it's stopped if err := c.waitForExitFileAndSync(); err != nil { return err |