Skip to content

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

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.

3 participants