Skip to content

Commit

Permalink
Merge pull request #436 from rramkumar1/patch-17
Browse files Browse the repository at this point in the history
Fix error handling in controller sync()
  • Loading branch information
MrHohn authored Aug 15, 2018
2 parents 274a1e5 + 3ef375e commit e880762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (lbc *LoadBalancerController) Stop(deleteAll bool) error {
}

// sync manages Ingress create/updates/deletes
func (lbc *LoadBalancerController) sync(key string) (retErr error) {
func (lbc *LoadBalancerController) sync(key string) error {
if !lbc.hasSynced() {
time.Sleep(context.StoreSyncPollPeriod)
return fmt.Errorf("waiting for stores to sync")
Expand Down Expand Up @@ -303,7 +303,7 @@ func (lbc *LoadBalancerController) sync(key string) (retErr error) {
// it could have been caused by quota issues; therefore, garbage collecting now may
// free up enough quota for the next sync to pass.
if gcErr := lbc.gc(lbNames, gceSvcPorts); gcErr != nil {
retErr = fmt.Errorf("error during sync %v, error during GC %v", retErr, gcErr)
glog.Errorf("error during end-of-sync GC %v", gcErr)
}

return ensureErr
Expand Down

0 comments on commit e880762

Please sign in to comment.