Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handling in controller sync() #436

Merged
merged 1 commit into from
Aug 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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