Commit 7d1c85e4 authored by Marcin Wielgus's avatar Marcin Wielgus

Test if 2 federated informers in rs controller are in sync

parent 6e75fa97
...@@ -232,9 +232,20 @@ func (frsc *ReplicaSetController) isSynced() bool { ...@@ -232,9 +232,20 @@ func (frsc *ReplicaSetController) isSynced() bool {
glog.V(2).Infof("Cluster list not synced") glog.V(2).Infof("Cluster list not synced")
return false 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) { if !frsc.fedPodInformer.GetTargetStore().ClustersSynced(clusters) {
return false return false
} }
if !frsc.fedPodInformer.GetTargetStore().ClustersSynced(clusters2) {
return false
}
if !frsc.replicaSetController.HasSynced() { if !frsc.replicaSetController.HasSynced() {
glog.V(2).Infof("federation replicaset list not synced") glog.V(2).Infof("federation replicaset list not synced")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment