summaryrefslogtreecommitdiff
path: root/libpod/oci_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-11 00:58:46 +0200
committerGitHub <noreply@github.com>2019-09-11 00:58:46 +0200
commit7ac6ed3b4b27621e7aa15da335e65ffa601fb83e (patch)
tree397083da135855ec39a94abd834fefc18079607a /libpod/oci_linux.go
parent997c4b56ed2121726e966afe9a102ed16ba78f93 (diff)
parentc2284962c798a11f3c956ee237f27cfd3b0fcb21 (diff)
downloadpodman-7ac6ed3b4b27621e7aa15da335e65ffa601fb83e.tar.gz
podman-7ac6ed3b4b27621e7aa15da335e65ffa601fb83e.tar.bz2
podman-7ac6ed3b4b27621e7aa15da335e65ffa601fb83e.zip
Merge pull request #3581 from mheon/no_cgroups
Support running containers without CGroups
Diffstat (limited to 'libpod/oci_linux.go')
-rw-r--r--libpod/oci_linux.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/oci_linux.go b/libpod/oci_linux.go
index 6dba1260c..091b6d155 100644
--- a/libpod/oci_linux.go
+++ b/libpod/oci_linux.go
@@ -402,10 +402,12 @@ func (r *OCIRuntime) stopContainer(ctr *Container, timeout uint) error {
}
var args []string
- if rootless.IsRootless() {
+ if rootless.IsRootless() || ctr.config.NoCgroups {
// we don't use --all for rootless containers as the OCI runtime might use
// the cgroups to determine the PIDs, but for rootless containers there is
// not any.
+ // Same logic for NoCgroups - we can't use cgroups as the user
+ // explicitly requested none be created.
args = []string{"kill", ctr.ID(), "KILL"}
} else {
args = []string{"kill", "--all", ctr.ID(), "KILL"}