Skip to content

Commit

Permalink
Merge pull request kubernetes#25648 from wojtek-t/smaller_resync_in_rc
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Explicitly enqueue controllers on failures and increase resync period

Ref kubernetes#25563
  • Loading branch information
k8s-merge-robot committed May 17, 2016
2 parents 7a089c3 + 626ff90 commit f4bda73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controller/replication/replication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ const (
// We'll attempt to recompute the required replicas of all replication controllers
// that have fulfilled their expectations at least this often. This recomputation
// happens based on contents in local pod storage.
FullControllerResyncPeriod = 30 * time.Second
// Full Resync shouldn't be needed at all in a healthy system. This is a protection
// against disappearing objects and watch notification, that we believe should not
// happen at all.
// TODO: We should get rid of it completely in the fullness of time.
FullControllerResyncPeriod = 10 * time.Minute

// Realistic value of the burstReplica field for the replication manager based off
// performance requirements for kubernetes 1.0.
Expand Down Expand Up @@ -477,6 +481,7 @@ func (rm *ReplicationManager) manageReplicas(filteredPods []*api.Pod, rc *api.Re
// Decrement the expected number of creates because the informer won't observe this pod
glog.V(2).Infof("Failed creation, decrementing expectations for controller %q/%q", rc.Namespace, rc.Name)
rm.expectations.CreationObserved(rcKey)
rm.enqueueController(rc)
utilruntime.HandleError(err)
}
}()
Expand Down Expand Up @@ -518,6 +523,7 @@ func (rm *ReplicationManager) manageReplicas(filteredPods []*api.Pod, rc *api.Re
podKey := controller.PodKey(filteredPods[ix])
glog.V(2).Infof("Failed to delete %v due to %v, decrementing expectations for controller %q/%q", podKey, err, rc.Namespace, rc.Name)
rm.expectations.DeletionObserved(rcKey, podKey)
rm.enqueueController(rc)
utilruntime.HandleError(err)
}
}(i)
Expand Down

0 comments on commit f4bda73

Please sign in to comment.