From b8f81c040582147156403cd76cd3e2327821494d Mon Sep 17 00:00:00 2001 From: Nick Sardo Date: Wed, 26 Apr 2017 10:23:19 -0700 Subject: [PATCH] Gracefully handle static ip deletion failure --- controllers/gce/loadbalancers/loadbalancers.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/gce/loadbalancers/loadbalancers.go b/controllers/gce/loadbalancers/loadbalancers.go index 64ccf7bc7..3073124d6 100644 --- a/controllers/gce/loadbalancers/loadbalancers.go +++ b/controllers/gce/loadbalancers/loadbalancers.go @@ -893,9 +893,10 @@ func (l *L7) Cleanup() error { l.fws = nil } if l.ip != nil { - glog.Infof("Deleting static IP %v(%v)", l.ip.Name, l.ip.Address) + glog.V(2).Infof("Deleting static IP %v(%v)", l.ip.Name, l.ip.Address) + // Ignore err when deleting static IP since multiple ingresses could be sharing one if err := utils.IgnoreHTTPNotFound(l.cloud.DeleteGlobalStaticIP(l.ip.Name)); err != nil { - return err + glog.Warningf("Failed to delete global static ip %v (%v), but will continue with remaining cleanup. err: %v", l.ip.Name, l.ip.Address, err) } l.ip = nil }