From f3390618164634ce839af88d68fc42874e0e776b Mon Sep 17 00:00:00 2001 From: ravisantoshgudimetla Date: Wed, 17 Mar 2021 15:04:47 -0400 Subject: [PATCH] Tighten DS rollout catching function --- test/e2e/apps/daemon_set.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/e2e/apps/daemon_set.go b/test/e2e/apps/daemon_set.go index afffd860dff..7229829d53d 100644 --- a/test/e2e/apps/daemon_set.go +++ b/test/e2e/apps/daemon_set.go @@ -1050,6 +1050,10 @@ func checkDaemonPodsImageAndAvailability(c clientset.Interface, ds *appsv1.Daemo unavailablePods := 0 nodesToUpdatedPodCount := make(map[string]int) for _, pod := range pods { + // Ignore the pod on the node that is supposed to be deleted + if pod.DeletionTimestamp != nil { + continue + } if !metav1.IsControlledBy(&pod, ds) { continue } @@ -1080,6 +1084,10 @@ func checkDaemonPodsImageAndAvailability(c clientset.Interface, ds *appsv1.Daemo func checkDaemonSetPodsLabels(podList *v1.PodList, hash string) { for _, pod := range podList.Items { + // Ignore all the DS pods that will be deleted + if pod.DeletionTimestamp != nil { + continue + } podHash := pod.Labels[appsv1.DefaultDaemonSetUniqueLabelKey] gomega.Expect(len(podHash)).To(gomega.BeNumerically(">", 0)) if len(hash) > 0 {