diff --git a/pkg/controller/node/ipam/cloud_cidr_allocator.go b/pkg/controller/node/ipam/cloud_cidr_allocator.go index 87fba8bb0a8..98b65b22e67 100644 --- a/pkg/controller/node/ipam/cloud_cidr_allocator.go +++ b/pkg/controller/node/ipam/cloud_cidr_allocator.go @@ -146,7 +146,10 @@ func (ca *cloudCIDRAllocator) worker(stopChan <-chan struct{}) { glog.Warning("Channel nodeCIDRUpdateChannel was unexpectedly closed") return } - ca.updateCIDRAllocation(workItem) + if err := ca.updateCIDRAllocation(workItem); err != nil { + // Requeue the failed node for update again. + ca.nodeUpdateChannel <- workItem + } case <-stopChan: return } diff --git a/pkg/controller/node/ipam/range_allocator.go b/pkg/controller/node/ipam/range_allocator.go index 6761e73fde9..d3037b1d1d1 100644 --- a/pkg/controller/node/ipam/range_allocator.go +++ b/pkg/controller/node/ipam/range_allocator.go @@ -176,7 +176,10 @@ func (r *rangeAllocator) worker(stopChan <-chan struct{}) { glog.Warning("Channel nodeCIDRUpdateChannel was unexpectedly closed") return } - r.updateCIDRAllocation(workItem) + if err := r.updateCIDRAllocation(workItem); err != nil { + // Requeue the failed node for update again. + r.nodeCIDRUpdateChannel <- workItem + } case <-stopChan: return }