Skip to content

Commit

Permalink
libpod: drop warning if cgroup doesn't exist
Browse files Browse the repository at this point in the history
do not print a warning on cgroup removal if it doesn't exist.

Closes: containers#13382

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Mar 2, 2022
1 parent 7877b02 commit e71d497
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libpod/runtime_pod_linux.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
//go:build linux
// +build linux

package libpod

import (
"context"
"fmt"
"os"
"path"
"path/filepath"
"strings"
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit e71d497

Please sign in to comment.