Skip to content

Commit 21395cb

Browse files
committed
source/network: Ignore bonding_masters interface during scanning
On Talos OS NFD logs constantly show errors related to the network attributes of bonding_masters. Closes: 1842 Signed-off-by: Oleg Zhurakivskyy <[email protected]>
1 parent 1fa31a5 commit 21395cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/network/network.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"fmt"
2222
"os"
2323
"path/filepath"
24+
"slices"
2425
"strconv"
2526
"strings"
2627
"syscall"
@@ -129,6 +130,10 @@ func detectNetDevices() ([]nfdv1alpha1.InstanceFeature, []nfdv1alpha1.InstanceFe
129130
return nil, nil, fmt.Errorf("failed to list network interfaces: %w", err)
130131
}
131132

133+
ifaces = slices.DeleteFunc(ifaces, func(iface os.DirEntry) bool {
134+
return iface.Name() == "bonding_masters"
135+
})
136+
132137
// Iterate over devices
133138
devIfacesinfo := make([]nfdv1alpha1.InstanceFeature, 0, len(ifaces))
134139
virtualIfacesinfo := make([]nfdv1alpha1.InstanceFeature, 0, len(ifaces))

0 commit comments

Comments
 (0)