Skip to content

Commit ff712e5

Browse files
committed
backport retry pool allocation after cleaning IPAM state
1 parent d089367 commit ff712e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cni/network/invoker_azure.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ func (invoker *AzureIPAMInvoker) Add(addConfig IPAMAddConfig) (IPAMAddResult, er
5656

5757
if err != nil && strings.Contains(err.Error(), ipam.ErrNoAvailableAddressPools.Error()) {
5858
invoker.deleteIpamState()
59+
log.Printf("Retry pool allocation after deleting IPAM state")
60+
addResult.ipv4Result, err = invoker.plugin.DelegateAdd(addConfig.nwCfg.IPAM.Type, addConfig.nwCfg)
5961
}
6062
if err != nil {
6163
err = invoker.plugin.Errorf("Failed to allocate pool: %v", err)

0 commit comments

Comments
 (0)