Skip to content

Commit

Permalink
Merge pull request #31231 from mwielgus/rs-fix3
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Test if 2 federated informers in rs controller are in sync

cc: @quinton-hoole @kubernetes/sig-cluster-federation
  • Loading branch information
Kubernetes Submit Queue committed Aug 23, 2016
2 parents 9484b2c + 7d1c85e commit d6fb8b0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d6fb8b0

Please sign in to comment.