diff --git a/libnetwork/store.go b/libnetwork/store.go index b622836498..9830a22d47 100644 --- a/libnetwork/store.go +++ b/libnetwork/store.go @@ -346,6 +346,10 @@ func (c *controller) networkWatchLoop(nw *netWatch, ep *endpoint, ecCh <-chan da } func (c *controller) processEndpointCreate(nmap map[string]*netWatch, ep *endpoint) { + if !c.isDistributedControl() && ep.getNetwork().driverScope() == datastore.GlobalScope { + return + } + c.Lock() nw, ok := nmap[ep.getNetwork().ID()] c.Unlock() @@ -400,6 +404,10 @@ func (c *controller) processEndpointCreate(nmap map[string]*netWatch, ep *endpoi } func (c *controller) processEndpointDelete(nmap map[string]*netWatch, ep *endpoint) { + if !c.isDistributedControl() && ep.getNetwork().driverScope() == datastore.GlobalScope { + return + } + c.Lock() nw, ok := nmap[ep.getNetwork().ID()]