Merge pull request #1262 from sainath14/macvlan_endpoint_delete

Delete endpoint from network map for macvlan driver upon endpoint deletion
This commit is contained in:
Alessandro Boch 2016-06-14 15:07:26 -07:00 committed by GitHub
commit 179f08a3f2
1 changed files with 4 additions and 0 deletions

View File

@ -83,8 +83,12 @@ func (d *driver) DeleteEndpoint(nid, eid string) error {
if link, err := ns.NlHandle().LinkByName(ep.srcName); err == nil {
ns.NlHandle().LinkDel(link)
}
if err := d.storeDelete(ep); err != nil {
logrus.Warnf("Failed to remove macvlan endpoint %s from store: %v", ep.id[0:7], err)
}
n.deleteEndpoint(ep.id)
return nil
}