Delete endpoint from network map for macvlan driver upon endpoint deletion

Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
sainath 2016-06-14 12:57:51 -07:00 committed by Sainath Grandhi
parent 4202b1f92d
commit e2b0934ac2
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
}