Skip to content

Commit 05cfc47

Browse files
authored
Merge pull request #1031 from ashokpariya0/fix-log-level
daemon: move empty device-plugin pod logging to callers
2 parents 0756e35 + a3e0504 commit 05cfc47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/daemon/daemon.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ func (dn *NodeReconciler) getDevicePluginPodsForNode(ctx context.Context) ([]cor
606606
return []corev1.Pod{}, err
607607
}
608608
if len(pods.Items) == 0 {
609-
funcLog.Info("no device plugin pods found")
610609
return []corev1.Pod{}, nil
611610
}
612611
return pods.Items, nil
@@ -622,6 +621,10 @@ func (dn *NodeReconciler) restartDevicePluginPod(ctx context.Context) error {
622621
if err != nil {
623622
return err
624623
}
624+
if len(devicePluginPods) == 0 {
625+
funcLog.V(2).Info("no device plugin pods found during restart attempt")
626+
return nil
627+
}
625628
for _, pod := range devicePluginPods {
626629
podUID := pod.UID
627630
funcLog.V(2).Info("Found device plugin pod, deleting it",

0 commit comments

Comments
 (0)