Return error instead of logging it

This commit is contained in:
Murat Kabilov
2017-05-18 17:24:44 +02:00
committed by GitHub
parent 95a57d1e4f
commit 233e8529c1
4 changed files with 24 additions and 16 deletions
+4 -1
View File
@@ -165,7 +165,10 @@ func (c *Controller) processEvent(obj interface{}) error {
c.clustersMu.Unlock()
}
cl.SyncCluster(stopCh)
if err := cl.Sync(stopCh); err != nil {
logger.Errorf("Can't sync cluster '%s': %s", clusterName, err)
return nil
}
logger.Infof("Cluster '%s' has been synced", clusterName)
}