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>
This commit is contained in:
Giuseppe Scrivano 2022-03-02 10:09:03 +01:00
parent 7877b02aac
commit e71d497e7c
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
1 changed files with 3 additions and 1 deletions

View File

@ -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)
}
}