-
Notifications
You must be signed in to change notification settings - Fork 260
Windows CNI to ignore removenamespaceendpoint error #1272
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
Conversation
…working into tamanoha/wincniDeleteFix
| return fmt.Errorf("Failed to remove hcn endpoint: %s from namespace: %s due to error: %v", ep.HnsId, | ||
| log.Errorf("Failed to remove hcn endpoint: %s from namespace: %s due to error: %v", ep.HnsId, | ||
| hcnEndpoint.HostComputeNamespace, err) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should be able to getNameSpace to check if it exists before calling this method. But not sure if HNS has a getNameSpace API to see if its created.
If not, can we parse the error to see if it contains a "namespace not found" error instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we discussed offline, even if this api return other errors, cni should still go ahead and delete hns endpoint and release ip from ipam
|
Will this fix #831? The error is We got "No available addresses" more frequently in recent. |
yep this PR will fix it |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
lgtm |
Reason for Change:
Windows CNI to ignore removenamespaceendpoint error. sometimes cri removes namespace before cni get to removenamespaceendpoint api and thus its failing with namespace not found error and hns endpoint and ip is getting leaked. this change will ignore error from that api and proceed with hns endpoint deletion and ip release
Issue Fixed:
Requirements:
Notes: