Skip to content

Commit 1d8e37a

Browse files
authored
Merge pull request #859 from zeeke/log/try-get-interface-name
logging: avoid `TryGetInterfaceName` logs
2 parents d93a012 + b643bbc commit 1d8e37a

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

cmd/sriov-network-config-daemon/service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ func (s *ServiceConfig) waitForDevicesInitialization() {
368368
for time.Now().Before(deadline) {
369369
for pciAddr, name := range devicesToWait {
370370
if s.hostHelper.TryGetInterfaceName(pciAddr) == name {
371+
s.log.Info("Device ready", "pci", pciAddr, "name", name)
371372
delete(devicesToWait, pciAddr)
372373
}
373374
}

pkg/host/internal/network/network.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func (n *network) TryToGetVirtualInterfaceName(pciAddr string) string {
7575
func (n *network) TryGetInterfaceName(pciAddr string) string {
7676
names, err := n.dputilsLib.GetNetNames(pciAddr)
7777
if err != nil || len(names) < 1 {
78-
log.Log.V(2).Info("TryGetInterfaceName(): failed to get interface name", "err", err, "pciAddress", pciAddr)
7978
return ""
8079
}
8180
netDevName := names[0]
@@ -96,7 +95,6 @@ func (n *network) TryGetInterfaceName(pciAddr string) string {
9695
return name
9796
}
9897

99-
log.Log.V(2).Info("TryGetInterfaceName()", "name", netDevName)
10098
return netDevName
10199
}
102100

pkg/host/internal/sriov/sriov.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (s *sriov) VFIsReady(pciAddr string) (netlink.Link, error) {
176176
err = wait.PollImmediate(time.Second, 10*time.Second, func() (bool, error) {
177177
vfIndex, err := s.networkHelper.GetInterfaceIndex(pciAddr)
178178
if err != nil {
179-
log.Log.Error(err, "VFIsReady(): invalid index number")
179+
log.Log.Error(err, "VFIsReady(): invalid index number", "device", pciAddr)
180180
return false, nil
181181
}
182182
vfLink, err = s.netlinkLib.LinkByIndex(vfIndex)

0 commit comments

Comments
 (0)