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 authored and mheon committed Mar 30, 2022
1 parent ef20213 commit 4dbb2bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libpod/runtime_pod_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package libpod
import (
"context"
"fmt"
"os"
"path"
"path/filepath"
"strings"
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 4dbb2bf

Please sign in to comment.