mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-16 21:38:23 +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
|
// Get hugepages
|
||||||
hugepageBytes, err := getHugepagesBytes(filepath.Join(sysBusNodeBasepath, numaNode, "hugepages"))
|
hugepageBytes, err := getHugepagesBytes(filepath.Join(sysBusNodeBasepath, numaNode, "hugepages"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
if os.IsNotExist(err) {
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for n, s := range hugepageBytes {
|
for n, s := range hugepageBytes {
|
||||||
info[n] = s
|
info[n] = s
|
||||||
|
|
Loading…
Add table
Reference in a new issue