Commit 94b6a1fb authored by Marek Grabowski's avatar Marek Grabowski

Fix panic in GCE loadbalancer library

parent 58fca39d
......@@ -344,7 +344,10 @@ func (gce *GCECloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID st
glog.Infof("ensureExternalLoadBalancerDeleted(%s): Failed to retrieve health check:%v.", lbRefStr, err)
return err
}
hcNames = append(hcNames, hcToDelete.Name)
// If we got 'StatusNotFound' LB was already deleted and it's safe to ignore.
if err == nil {
hcNames = append(hcNames, hcToDelete.Name)
}
} else {
// EnsureLoadBalancerDeleted() could be triggered by changing service from
// LoadBalancer type to others. In this case we have no idea whether it was
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment