Skip to content

Conversation

@tamilmani1989
Copy link
Member

This fix makes sure that there is no ip address leak even if delete endpoint(removing veth pair and resources) fails. It assumes container namespace would have been removed already and will invoke ipam release call to release ip address and other resources

…failed, CNI should invoke ipam release call.
if err != nil {
err = plugin.Errorf("Failed to release address: %v", err)
return err
log.Printf("Failed to release address: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let it throw here. Handle it in IPAM. ReleaseAddress should not fail in IPAM.

}

// Delete the endpoint.
err = plugin.nm.DeleteEndpoint(networkId, endpointId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Update DeleteLink in netlink implementation. Throw the error here!

@sharmasushant sharmasushant self-assigned this Oct 18, 2017
@tamilmani1989 tamilmani1989 merged commit e246fec into Azure:master Oct 19, 2017
@tamilmani1989 tamilmani1989 deleted the cni_del_fix branch October 19, 2017 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants