Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion network/endpoint_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ func (nw *network) deleteEndpointImplHnsV2(ep *endpoint) error {

// Remove this endpoint from the namespace
if err = hnsv2.RemoveNamespaceEndpoint(hcnEndpoint.HostComputeNamespace, hcnEndpoint.Id); err != nil {
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)
}
Copy link
Contributor

@aegal aegal Mar 9, 2022

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?

Copy link
Member Author

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


Expand Down