From d2312229ddb521d36cf77d8f287e2eca6f5ebe12 Mon Sep 17 00:00:00 2001 From: bprashanth Date: Tue, 22 Nov 2016 18:31:34 -0800 Subject: [PATCH] Don't retry on instance group not found --- controllers/gce/instances/instances.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/gce/instances/instances.go b/controllers/gce/instances/instances.go index c8279b3c6..1fa21cba5 100644 --- a/controllers/gce/instances/instances.go +++ b/controllers/gce/instances/instances.go @@ -101,9 +101,12 @@ func (i *Instances) DeleteInstanceGroup(name string) error { return err } for _, zone := range zones { - glog.Infof("Deleting instance group %v in zone %v", name, zone) if err := i.cloud.DeleteInstanceGroup(name, zone); err != nil { - errs = append(errs, err) + if !utils.IsHTTPErrorCode(err, http.StatusNotFound) { + errs = append(errs, err) + } + } else { + glog.Infof("Deleted instance group %v in zone %v", name, zone) } } if len(errs) == 0 {