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 committed by Matthew Heon
parent ef202133f5
commit 4dbb2bf92b

View file

@ -6,6 +6,7 @@ package libpod
import (
"context"
"fmt"
"os"
"path"
"path/filepath"
"strings"
@ -239,7 +240,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)
}
}