Skip to content

Commit 2fb865f

Browse files
Error log fix (#756)
1 parent f0892cc commit 2fb865f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/node/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ func (n Node) fetchKubernetesNode(nodeName string) (*corev1.Node, error) {
611611
listOptions := metav1.ListOptions{LabelSelector: labels.Set(labelSelector.MatchLabels).String()}
612612
matchingNodes, err := n.drainHelper.Client.CoreV1().Nodes().List(context.TODO(), listOptions)
613613
if err != nil || len(matchingNodes.Items) == 0 {
614-
log.Err(err).Msgf("Error when trying to list Nodes w/ label, falling back to direct Get lookup of node")
614+
log.Warn().Msgf("Unable to list Nodes w/ label, falling back to direct Get lookup of node")
615615
return n.drainHelper.Client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{})
616616
}
617617
return &matchingNodes.Items[0], nil

0 commit comments

Comments
 (0)