diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-11 00:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-11 00:58:46 +0200 |
commit | 7ac6ed3b4b27621e7aa15da335e65ffa601fb83e (patch) | |
tree | 397083da135855ec39a94abd834fefc18079607a /libpod/stats.go | |
parent | 997c4b56ed2121726e966afe9a102ed16ba78f93 (diff) | |
parent | c2284962c798a11f3c956ee237f27cfd3b0fcb21 (diff) | |
download | podman-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/stats.go')
-rw-r--r-- | libpod/stats.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/stats.go b/libpod/stats.go index 776870bd2..5513abce5 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -19,6 +19,10 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container stats.ContainerID = c.ID() stats.Name = c.Name() + if c.config.NoCgroups { + return nil, errors.Wrapf(define.ErrNoCgroups, "cannot run top on container %s as it did not create a cgroup", c.ID()) + } + if !c.batched { c.lock.Lock() defer c.lock.Unlock() |