Merge pull request #7643 from bprashanth/rc_status

Requeue rc if a single get/put retry on status.Replicas fails
This commit is contained in:
Daniel Smith
2015-05-04 12:15:30 -07:00
5 changed files with 133 additions and 29 deletions

View File

@@ -349,9 +349,12 @@ func (rm *ReplicationManager) syncReplicationController(key string) error {
rm.manageReplicas(filteredPods, &controller)
}
// Always updates status as pods come up or die
if err := updateReplicaCount(rm.kubeClient.ReplicationControllers(controller.Namespace), &controller, len(filteredPods)); err != nil {
glog.V(2).Infof("Failed to update replica count for controller %v, will try on next sync", controller.Name)
// Always updates status as pods come up or die.
if err := updateReplicaCount(rm.kubeClient.ReplicationControllers(controller.Namespace), controller, len(filteredPods)); err != nil {
// Multiple things could lead to this update failing. Requeuing the controller ensures
// we retry with some fairness.
glog.V(2).Infof("Failed to update replica count for controller %v, requeuing", controller.Name)
rm.enqueueController(&controller)
}
return nil
}