1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

fix empty hugepages in some numa nodes caused no such file or directory error

Signed-off-by: lizhun <lizhun@kylinos.cn>
This commit is contained in:
lizhun 2023-08-08 15:14:44 +08:00
parent e0f10a81de
commit a4ad3d4411

View file

@ -69,7 +69,11 @@ func GetNumaMemoryResources() (NumaMemoryResources, error) {
// Get hugepages
hugepageBytes, err := getHugepagesBytes(filepath.Join(sysBusNodeBasepath, numaNode, "hugepages"))
if err != nil {
return nil, err
if os.IsNotExist(err) {
continue
} else {
return nil, err
}
}
for n, s := range hugepageBytes {
info[n] = s