From 9c5f311effb88db2a344777db322b990e637821b Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Sat, 15 Jun 2019 08:11:44 -0700 Subject: [PATCH] Remove unnecessary loop for lowering expectations --- pkg/controller/daemon/daemon_controller.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/controller/daemon/daemon_controller.go b/pkg/controller/daemon/daemon_controller.go index 11fc71eb598..9cab992cc11 100644 --- a/pkg/controller/daemon/daemon_controller.go +++ b/pkg/controller/daemon/daemon_controller.go @@ -1079,9 +1079,7 @@ func (dsc *DaemonSetsController) syncNodes(ds *apps.DaemonSet, podsToDelete, nod skippedPods := createDiff - (batchSize + pos) if errorCount < len(errCh) && skippedPods > 0 { klog.V(2).Infof("Slow-start failure. Skipping creation of %d pods, decrementing expectations for set %q/%q", skippedPods, ds.Namespace, ds.Name) - for i := 0; i < skippedPods; i++ { - dsc.expectations.CreationObserved(dsKey) - } + dsc.expectations.LowerExpectations(dsKey, skippedPods, 0) // The skipped pods will be retried later. The next controller resync will // retry the slow start process. break