diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-03-21 11:28:16 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-11 14:43:57 +0000 |
commit | df83d361e4fe3c1fc1939b096cb21aa2e7ec3d74 (patch) | |
tree | 3f4bb6dba3763a5895135fadecc005eeb0ea96ca /libpod/stats.go | |
parent | fee9ec18584bcc31ce4889bdbda2fc2a829eaf5f (diff) | |
download | podman-df83d361e4fe3c1fc1939b096cb21aa2e7ec3d74.tar.gz podman-df83d361e4fe3c1fc1939b096cb21aa2e7ec3d74.tar.bz2 podman-df83d361e4fe3c1fc1939b096cb21aa2e7ec3d74.zip |
Major fixes to systemd cgroup handling
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #507
Approved by: baude
Diffstat (limited to 'libpod/stats.go')
-rw-r--r-- | libpod/stats.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libpod/stats.go b/libpod/stats.go index 33e57572c..52bcc901d 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -43,9 +43,14 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container return stats, nil } - cgroup, err := cgroups.Load(cgroups.V1, c.CGroupPath()) + cgroupPath, err := c.CGroupPath() if err != nil { - return stats, errors.Wrapf(err, "unable to load cgroup at %+v", c.CGroupPath()) + return nil, err + } + + cgroup, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(cgroupPath)) + if err != nil { + return stats, errors.Wrapf(err, "unable to load cgroup at %s", cgroupPath) } cgroupStats, err := cgroup.Stat() |