From e71d497e7ca7d67c7648800d303b337c52044cae Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 2 Mar 2022 10:09:03 +0100 Subject: libpod: drop warning if cgroup doesn't exist do not print a warning on cgroup removal if it doesn't exist. Closes: https://github.com/containers/podman/issues/13382 [NO NEW TESTS NEEDED] Signed-off-by: Giuseppe Scrivano --- libpod/runtime_pod_linux.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go index 155ad5c2d..cde07ed89 100644 --- a/libpod/runtime_pod_linux.go +++ b/libpod/runtime_pod_linux.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package libpod @@ -5,6 +6,7 @@ package libpod import ( "context" "fmt" + "os" "path" "path/filepath" "strings" @@ -236,7 +238,7 @@ func (r *Runtime) removePod(ctx context.Context, p *Pod, removeCtrs, force bool, // Don't try if we failed to retrieve the cgroup if err == nil { - if err := conmonCgroup.Update(resLimits); err != nil { + if err := conmonCgroup.Update(resLimits); err != nil && !os.IsNotExist(err) { logrus.Warnf("Error updating pod %s conmon cgroup PID limit: %v", p.ID(), err) } } -- cgit v1.2.3-54-g00ecf