Skip to content

Commit

Permalink
chore: Add EOPNOTSUPP to err filter for PSI data
Browse files Browse the repository at this point in the history
* When PSI is not enabled attempting to read files end up in Operation Not Supported error which corresponds to EOPNOTSUPP error

* Add that error to filter to suppress inappropriate log message

Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
  • Loading branch information
mahendrapaipuri committed Jan 17, 2024
1 parent 1a0f8bf commit 771e32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgroup2/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ func getStatPSIFromFile(path string) *stats.PSIStats {
}

if err := sc.Err(); err != nil {
if !errors.Is(err, unix.ENOTSUP) {
if !errors.Is(err, unix.ENOTSUP) && !errors.Is(err, unix.EOPNOTSUPP) {
logrus.Errorf("unable to parse PSI data: %v", err)
}
return nil
Expand Down

0 comments on commit 771e32a

Please sign in to comment.