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:
parent
e0f10a81de
commit
a4ad3d4411
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue