Skip to content

Commit

Permalink
Merge pull request kubevirt#10685 from haojue/networkdriver
Browse files Browse the repository at this point in the history
correct log message in pkg/network/driver/
  • Loading branch information
kubevirt-bot authored Nov 8, 2023
2 parents bc447c6 + 81a60c5 commit b8462c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pkg/network/driver/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (h *NetworkUtilsHandler) HasIPv6GlobalUnicastAddress(interfaceName string)
func (h *NetworkUtilsHandler) IsIpv4Primary() (bool, error) {
podIP, exist := os.LookupEnv("MY_POD_IP")
if !exist {
return false, fmt.Errorf("MY_POD_IP doesnt exists")
return false, fmt.Errorf("MY_POD_IP doesn't exist")
}

return !netutils.IsIPv6String(podIP), nil
Expand All @@ -137,7 +137,7 @@ func (h *NetworkUtilsHandler) ReadIPAddressesFromLink(interfaceName string) (str
// get IP address
addrList, err := h.AddrList(link, netlink.FAMILY_ALL)
if err != nil {
log.Log.Reason(err).Errorf("failed to get a address for interface: %s", interfaceName)
log.Log.Reason(err).Errorf("failed to get an address for interface: %s", interfaceName)
return "", "", err
}

Expand Down Expand Up @@ -189,7 +189,7 @@ func (h *NetworkUtilsHandler) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceNa
nic.Mtu,
dhcpOptions,
); err != nil {
log.Log.Errorf("failed to run DHCP: %v", err)
log.Log.Errorf("failed to run DHCP Server: %v", err)
panic(err)
}
}()
Expand All @@ -201,7 +201,7 @@ func (h *NetworkUtilsHandler) StartDHCP(nic *cache.DHCPConfig, bridgeInterfaceNa
nic.IPv6.IP,
bridgeInterfaceName,
); err != nil {
log.Log.Reason(err).Error("failed to run DHCPv6")
log.Log.Reason(err).Error("failed to run DHCPv6 Server")
panic(err)
}
}()
Expand Down
2 changes: 1 addition & 1 deletion pkg/network/driver/nmstate/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (n NMState) Apply(spec *Spec) error {
}
macSourceLink, err := n.adapter.LinkByName(iface.CopyMacFrom)
if err != nil {
return fmt.Errorf("unable to find mac shource link [%s]: %v", iface.Name, err)
return fmt.Errorf("unable to find mac source link [%s]: %v", iface.Name, err)
}
iface.MacAddress = macSourceLink.Attrs().HardwareAddr.String()
}
Expand Down

0 comments on commit b8462c9

Please sign in to comment.