mirror of https://github.com/k3s-io/k3s
Print SyncCloud errors
This small change would have saved me a lot of time while investigating issue #2746.pull/6/head
parent
7d3cac35a5
commit
51efd38e75
|
@ -54,7 +54,11 @@ func NewMinionController(
|
||||||
// Run starts syncing instances from cloudprovider periodically, or create initial minion list.
|
// Run starts syncing instances from cloudprovider periodically, or create initial minion list.
|
||||||
func (s *MinionController) Run(period time.Duration) {
|
func (s *MinionController) Run(period time.Duration) {
|
||||||
if s.cloud != nil && len(s.matchRE) > 0 {
|
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 {
|
} else {
|
||||||
go s.SyncStatic(period)
|
go s.SyncStatic(period)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue