From 771e32ab673120be973e22a6d8de5148ae1406a9 Mon Sep 17 00:00:00 2001 From: Mahendra Paipuri Date: Thu, 4 Jan 2024 14:38:05 +0100 Subject: [PATCH] chore: Add `EOPNOTSUPP` to err filter for PSI data * 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 --- cgroup2/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgroup2/utils.go b/cgroup2/utils.go index 3cc3037f..54537c3e 100644 --- a/cgroup2/utils.go +++ b/cgroup2/utils.go @@ -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