Merge pull request #31231 from mwielgus/rs-fix3

Automatic merge from submit-queue

Test if 2 federated informers in rs controller are in sync

cc: @quinton-hoole @kubernetes/sig-cluster-federation
This commit is contained in:
Kubernetes Submit Queue 2016-08-23 08:04:11 -07:00 committed by GitHub
commit d6fb8b06dd

View File

@ -226,9 +226,20 @@ func (frsc *ReplicaSetController) isSynced() bool {
glog.V(2).Infof("Cluster list not synced")
return false
}
clusters2, err := frsc.fedPodInformer.GetReadyClusters()
if err != nil {
glog.Errorf("Failed to get ready clusters: %v", err)
return false
}
// This also checks whether podInformer and replicaSetInformer have the
// same cluster lists.
if !frsc.fedPodInformer.GetTargetStore().ClustersSynced(clusters) {
return false
}
if !frsc.fedPodInformer.GetTargetStore().ClustersSynced(clusters2) {
return false
}
if !frsc.replicaSetController.HasSynced() {
glog.V(2).Infof("federation replicaset list not synced")