Commit 02a7e92b authored by Shyam Jeedigunta's avatar Shyam Jeedigunta

Requeue failed updates for retry in CIDR allocator

parent 4b5ca131
...@@ -146,7 +146,10 @@ func (ca *cloudCIDRAllocator) worker(stopChan <-chan struct{}) { ...@@ -146,7 +146,10 @@ func (ca *cloudCIDRAllocator) worker(stopChan <-chan struct{}) {
glog.Warning("Channel nodeCIDRUpdateChannel was unexpectedly closed") glog.Warning("Channel nodeCIDRUpdateChannel was unexpectedly closed")
return return
} }
ca.updateCIDRAllocation(workItem) if err := ca.updateCIDRAllocation(workItem); err != nil {
// Requeue the failed node for update again.
ca.nodeUpdateChannel <- workItem
}
case <-stopChan: case <-stopChan:
return return
} }
......
...@@ -176,7 +176,10 @@ func (r *rangeAllocator) worker(stopChan <-chan struct{}) { ...@@ -176,7 +176,10 @@ func (r *rangeAllocator) worker(stopChan <-chan struct{}) {
glog.Warning("Channel nodeCIDRUpdateChannel was unexpectedly closed") glog.Warning("Channel nodeCIDRUpdateChannel was unexpectedly closed")
return return
} }
r.updateCIDRAllocation(workItem) if err := r.updateCIDRAllocation(workItem); err != nil {
// Requeue the failed node for update again.
r.nodeCIDRUpdateChannel <- workItem
}
case <-stopChan: case <-stopChan:
return return
} }
......
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