Skip to content

Commit

Permalink
fix: retry pool allocation after cleaning IPAM state (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshr-w authored Oct 20, 2023
1 parent 996c3fe commit e03114c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cni/network/invoker_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ func (invoker *AzureIPAMInvoker) Add(addConfig IPAMAddConfig) (IPAMAddResult, er

if err != nil && strings.Contains(err.Error(), ipam.ErrNoAvailableAddressPools.Error()) {
invoker.deleteIpamState()
logger.Info("Retry pool allocation after deleting IPAM state")
addResult.ipv4Result, err = invoker.plugin.DelegateAdd(addConfig.nwCfg.IPAM.Type, addConfig.nwCfg)
}

if err != nil {
err = invoker.plugin.Errorf("Failed to allocate pool: %v", err)
return addResult, err
Expand Down

0 comments on commit e03114c

Please sign in to comment.