From e2b0934ac2b9688c2f163bb25bdad5810f3cf82f Mon Sep 17 00:00:00 2001 From: sainath Date: Tue, 14 Jun 2016 12:57:51 -0700 Subject: [PATCH] Delete endpoint from network map for macvlan driver upon endpoint deletion Signed-off-by: Sainath Grandhi --- libnetwork/drivers/macvlan/macvlan_endpoint.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnetwork/drivers/macvlan/macvlan_endpoint.go b/libnetwork/drivers/macvlan/macvlan_endpoint.go index 54844c93da..d76858ea36 100644 --- a/libnetwork/drivers/macvlan/macvlan_endpoint.go +++ b/libnetwork/drivers/macvlan/macvlan_endpoint.go @@ -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 }