Skip to content

Commit e03114c

Browse files
authored
fix: retry pool allocation after cleaning IPAM state (#2309)
1 parent 996c3fe commit e03114c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cni/network/invoker_azure.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ func (invoker *AzureIPAMInvoker) Add(addConfig IPAMAddConfig) (IPAMAddResult, er
6464

6565
if err != nil && strings.Contains(err.Error(), ipam.ErrNoAvailableAddressPools.Error()) {
6666
invoker.deleteIpamState()
67+
logger.Info("Retry pool allocation after deleting IPAM state")
68+
addResult.ipv4Result, err = invoker.plugin.DelegateAdd(addConfig.nwCfg.IPAM.Type, addConfig.nwCfg)
6769
}
70+
6871
if err != nil {
6972
err = invoker.plugin.Errorf("Failed to allocate pool: %v", err)
7073
return addResult, err

0 commit comments

Comments
 (0)