Skip to content

Commit

Permalink
utils: move message from warning to debug
Browse files Browse the repository at this point in the history
if a pid could not be moved to a new cgroup, print a debug message
instead of a warning.

Backport of commit 969cc32.

[NO TESTS NEEDED]

Closes: containers#10674
Signed-off-by: Giuseppe Scrivano <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
giuseppe authored and vrothberg committed Jun 22, 2021
1 parent ab4d0cf commit dac2d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/utils_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func moveUnderCgroup(cgroup, subtree string, processes []uint32) error {
if len(processes) > 0 {
for _, pid := range processes {
if _, err := f.Write([]byte(fmt.Sprintf("%d\n", pid))); err != nil {
logrus.Warnf("Cannot move process %d to cgroup %q", pid, newCgroup)
logrus.Debugf("Cannot move process %d to cgroup %q: %v", pid, newCgroup, err)
}
}
} else {
Expand All @@ -185,7 +185,7 @@ func moveUnderCgroup(cgroup, subtree string, processes []uint32) error {
continue
}
if _, err := f.Write(pid); err != nil {
logrus.Warnf("Cannot move process %s to cgroup %q", string(pid), newCgroup)
logrus.Debugf("Cannot move process %s to cgroup %q: %v", string(pid), newCgroup, err)
}
}
}
Expand Down

0 comments on commit dac2d31

Please sign in to comment.