Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: retry pool allocation after cleaning IPAM state #2309

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

jshr-w
Copy link
Contributor

@jshr-w jshr-w commented Oct 19, 2023

Reason for Change:

On failure to allocate pool, this PR retries ADD immediately after IPAM state deletion in order to reduce the potential for the CNI to block.

Issue Fixed:

Requirements:

Notes:

@jshr-w jshr-w added cni Related to CNI. fix Fixes something. labels Oct 19, 2023
@jshr-w jshr-w self-assigned this Oct 19, 2023
@jshr-w jshr-w requested a review from a team as a code owner October 19, 2023 16:21
@jshr-w jshr-w requested a review from tamilmani1989 October 19, 2023 16:21
@jshr-w jshr-w force-pushed the shjayaraman/fixaddrpoolalloc branch from 62c8e57 to bfed150 Compare October 19, 2023 16:25
@@ -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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you validate and it worked? Like CNI able to recover and second DelegateAdd call succeeded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I checked the logs and there was no follow-up Delete and Add call by containerd after this change was made - the container was created with the single ADD call.

@tamilmani1989 tamilmani1989 merged commit e03114c into master Oct 20, 2023
@tamilmani1989 tamilmani1989 deleted the shjayaraman/fixaddrpoolalloc branch October 20, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cni Related to CNI. fix Fixes something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants