diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-03-02 10:09:03 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-03-02 10:09:05 +0100 |
commit | e71d497e7ca7d67c7648800d303b337c52044cae (patch) | |
tree | 22551c5290081dfdcb90d67a07e29504e5b40b44 /libpod | |
parent | 7877b02aacf3e8d3d37f6283c6b8aa81688fd120 (diff) | |
download | podman-e71d497e7ca7d67c7648800d303b337c52044cae.tar.gz podman-e71d497e7ca7d67c7648800d303b337c52044cae.tar.bz2 podman-e71d497e7ca7d67c7648800d303b337c52044cae.zip |
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 <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime_pod_linux.go | 4 |
1 files changed, 3 insertions, 1 deletions
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) } } |