Skip to content

Commit 7338fab

Browse files
authored
Merge pull request moby#3999 from tonistiigi/psi-notsup
allow ENOTSUP for PSI cgroup files
2 parents 7a65d56 + fca346f commit 7338fab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

executor/resources/cpu.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"path/filepath"
77
"strconv"
88
"strings"
9+
"syscall"
910

1011
"github.com/moby/buildkit/executor/resources/types"
1112
"github.com/pkg/errors"
@@ -81,7 +82,7 @@ func getCgroupCPUStat(cgroupPath string) (*types.CPUStat, error) {
8182
func parsePressureFile(filename string) (*types.Pressure, error) {
8283
content, err := os.ReadFile(filename)
8384
if err != nil {
84-
if errors.Is(err, os.ErrNotExist) { // pressure file requires CONFIG_PSI
85+
if errors.Is(err, os.ErrNotExist) || errors.Is(err, syscall.ENOTSUP) { // pressure file requires CONFIG_PSI
8586
return nil, nil
8687
}
8788
return nil, err

0 commit comments

Comments
 (0)