summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-07 14:16:43 +0100
committerGitHub <noreply@github.com>2020-03-07 14:16:43 +0100
commitc8de26fb0835bb3572af250088d4f66a3162ccd0 (patch)
tree9fa5f0d4b6f2591b5809dd23d0349d984f630db7 /libpod
parent43bf4f6626cc25ab839d989c025771de4669f86b (diff)
parent8b5e2a6297e6f6a5426551d1648278906a9d23de (diff)
downloadpodman-c8de26fb0835bb3572af250088d4f66a3162ccd0.tar.gz
podman-c8de26fb0835bb3572af250088d4f66a3162ccd0.tar.bz2
podman-c8de26fb0835bb3572af250088d4f66a3162ccd0.zip
Merge pull request #5374 from baude/create
add default network for apiv2 create
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_ctr.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index de93fdce7..ba2a6b93e 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -10,6 +10,7 @@ import (
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/events"
+ "github.com/containers/libpod/pkg/cgroups"
"github.com/containers/libpod/pkg/rootless"
"github.com/containers/storage/pkg/stringid"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -438,9 +439,16 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool,
if err := c.ociRuntime.KillContainer(c, 9, false); err != nil {
return err
}
- if err := c.unpause(); err != nil {
+ isV2, err := cgroups.IsCgroup2UnifiedMode()
+ if err != nil {
return err
}
+ // cgroups v1 and v2 handle signals on paused processes differently
+ if !isV2 {
+ if err := c.unpause(); 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