Print SyncCloud errors

This small change would have saved me a lot of time while investigating
issue #2746.
pull/6/head
Richard Larocque 2014-12-05 11:07:45 -08:00
parent 7d3cac35a5
commit 51efd38e75
1 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,11 @@ func NewMinionController(
// Run starts syncing instances from cloudprovider periodically, or create initial minion list.
func (s *MinionController) Run(period time.Duration) {
if s.cloud != nil && len(s.matchRE) > 0 {
go util.Forever(func() { s.SyncCloud() }, period)
go util.Forever(func() {
if err := s.SyncCloud(); err != nil {
glog.Errorf("Error syncing cloud: %v", err)
}
}, period)
} else {
go s.SyncStatic(period)
}