use syncError in defer GC
This commit is contained in:
parent
cd3e546c80
commit
334cc366be
1 changed files with 2 additions and 2 deletions
|
@ -294,16 +294,16 @@ func (lbc *LoadBalancerController) sync(key string) (err error) {
|
|||
// successful GC we know that there are no dangling cloud resources that
|
||||
// don't have an associated Kubernetes Ingress/Service/Endpoint.
|
||||
|
||||
var syncError error
|
||||
defer func() {
|
||||
if deferErr := lbc.CloudClusterManager.GC(lbNames, nodePorts); deferErr != nil {
|
||||
err = fmt.Errorf("error during sync %v, error during GC %v", err, deferErr)
|
||||
err = fmt.Errorf("error during sync %v, error during GC %v", syncError, deferErr)
|
||||
}
|
||||
glog.V(3).Infof("Finished syncing %v", key)
|
||||
}()
|
||||
|
||||
// Record any errors during sync and throw a single error at the end. This
|
||||
// allows us to free up associated cloud resources ASAP.
|
||||
var syncError error
|
||||
if err := lbc.CloudClusterManager.Checkpoint(lbs, nodeNames, nodePorts); err != nil {
|
||||
// TODO: Implement proper backoff for the queue.
|
||||
eventMsg := "GCE"
|
||||
|
|
Loading…
Reference in a new issue