summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-20 16:57:55 +0200
committerGitHub <noreply@github.com>2019-08-20 16:57:55 +0200
commit230faa864f8922f16a0d70c4a3454d51768e9a15 (patch)
tree4e6f9e0d5436e0bc8f484b7a33e48dc3a8d67216 /libpod
parent34fc1d09d245cbd0d922562860f639667c8641d6 (diff)
parent539b7b6058a1b034e7b982dec3a822e024a24d54 (diff)
downloadpodman-230faa864f8922f16a0d70c4a3454d51768e9a15.tar.gz
podman-230faa864f8922f16a0d70c4a3454d51768e9a15.tar.bz2
podman-230faa864f8922f16a0d70c4a3454d51768e9a15.zip
Merge pull request #3569 from rhatdan/cgroupsv1
Fix error message on podman stats on cgroups v1 rootless environments
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_pod_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go
index 073c5054d..05866d05a 100644
--- a/libpod/runtime_pod_linux.go
+++ b/libpod/runtime_pod_linux.go
@@ -204,7 +204,7 @@ func (r *Runtime) removePod(ctx context.Context, p *Pod, removeCtrs, force bool)
// Get the conmon CGroup
conmonCgroupPath := filepath.Join(p.state.CgroupPath, "conmon")
conmonCgroup, err := cgroups.Load(conmonCgroupPath)
- if err != nil && err != cgroups.ErrCgroupDeleted {
+ if err != nil && err != cgroups.ErrCgroupDeleted && err != cgroups.ErrCgroupV1Rootless {
removalErr = errors.Wrapf(err, "error retrieving pod %s conmon cgroup %s", p.ID(), conmonCgroupPath)
}
@@ -266,7 +266,7 @@ func (r *Runtime) removePod(ctx context.Context, p *Pod, removeCtrs, force bool)
// hard - instead, just log errors.
conmonCgroupPath := filepath.Join(p.state.CgroupPath, "conmon")
conmonCgroup, err := cgroups.Load(conmonCgroupPath)
- if err != nil && err != cgroups.ErrCgroupDeleted {
+ if err != nil && err != cgroups.ErrCgroupDeleted && err != cgroups.ErrCgroupV1Rootless {
if removalErr == nil {
removalErr = errors.Wrapf(err, "error retrieving pod %s conmon cgroup", p.ID())
} else {
@@ -283,7 +283,7 @@ func (r *Runtime) removePod(ctx context.Context, p *Pod, removeCtrs, force bool)
}
}
cgroup, err := cgroups.Load(p.state.CgroupPath)
- if err != nil && err != cgroups.ErrCgroupDeleted {
+ if err != nil && err != cgroups.ErrCgroupDeleted && err != cgroups.ErrCgroupV1Rootless {
if removalErr == nil {
removalErr = errors.Wrapf(err, "error retrieving pod %s cgroup", p.ID())
} else {