Skip to content

Commit

Permalink
Test if 2 federated informers in rs controller are in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mwielgus committed Aug 23, 2016
1 parent 6e75fa9 commit 7d1c85e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,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 7d1c85e

Please sign in to comment.