diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-07 15:56:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 15:56:50 +0200 |
commit | 44f910c28cae178eab9ad439587355fa4927dab7 (patch) | |
tree | 53701fc2dda877bb5fa162dfea264acc08b3d301 /pkg | |
parent | c0e29b4a31e330927b7a980209b2aae192f9bafe (diff) | |
parent | 7864afd6b2c0cfaa91a7cd1d255ece4c89814ce2 (diff) | |
download | podman-44f910c28cae178eab9ad439587355fa4927dab7.tar.gz podman-44f910c28cae178eab9ad439587355fa4927dab7.tar.bz2 podman-44f910c28cae178eab9ad439587355fa4927dab7.zip |
Merge pull request #5728 from openSUSE/pids.current
Do not error on pids.current stats if ctr.path is empty
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/cgroups/pids.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/cgroups/pids.go b/pkg/cgroups/pids.go index 65b9b5b34..92f82553b 100644 --- a/pkg/cgroups/pids.go +++ b/pkg/cgroups/pids.go @@ -44,8 +44,12 @@ func (c *pidHandler) Destroy(ctr *CgroupControl) error { // Stat fills a metrics structure with usage stats for the controller func (c *pidHandler) Stat(ctr *CgroupControl, m *Metrics) error { - var PIDRoot string + if ctr.path != "" { + // nothing we can do to retrieve the pids.current path + return nil + } + var PIDRoot string if ctr.cgroup2 { PIDRoot = filepath.Join(cgroupRoot, ctr.path) } else { |