diff --git a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go index 494d47d79f5..02d113af52b 100644 --- a/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go +++ b/pkg/controller/nodeipam/ipam/cloud_cidr_allocator.go @@ -157,7 +157,6 @@ func (ca *cloudCIDRAllocator) worker(stopChan <-chan struct{}) { } if err := ca.updateCIDRAllocation(workItem); err == nil { glog.V(3).Infof("Updated CIDR for %q", workItem) - ca.removeNodeFromProcessing(workItem) } else { glog.Errorf("Error updating CIDR for %q: %v", workItem, err) if canRetry, timeout := ca.retryParams(workItem); canRetry { @@ -170,6 +169,7 @@ func (ca *cloudCIDRAllocator) worker(stopChan <-chan struct{}) { } glog.Errorf("Exceeded retry count for %q, dropping from queue", workItem) } + ca.removeNodeFromProcessing(workItem) case <-stopChan: return }