mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Ignoring locally scoped endpoints/networks from distributed delete
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
5fda09dc68
commit
49d9787749
1 changed files with 8 additions and 2 deletions
|
@ -191,8 +191,11 @@ func (c *controller) watchNetworks() error {
|
||||||
lview := c.networks
|
lview := c.networks
|
||||||
c.Unlock()
|
c.Unlock()
|
||||||
for k, v := range lview {
|
for k, v := range lview {
|
||||||
|
global, _ := v.isGlobalScoped()
|
||||||
|
if global {
|
||||||
tmpview[k] = v
|
tmpview[k] = v
|
||||||
}
|
}
|
||||||
|
}
|
||||||
c.processNetworkUpdate(nws, &tmpview)
|
c.processNetworkUpdate(nws, &tmpview)
|
||||||
// Delete processing
|
// Delete processing
|
||||||
for k := range tmpview {
|
for k := range tmpview {
|
||||||
|
@ -243,8 +246,11 @@ func (n *network) watchEndpoints() error {
|
||||||
lview := n.endpoints
|
lview := n.endpoints
|
||||||
n.Unlock()
|
n.Unlock()
|
||||||
for k, v := range lview {
|
for k, v := range lview {
|
||||||
|
global, _ := v.network.isGlobalScoped()
|
||||||
|
if global {
|
||||||
tmpview[k] = v
|
tmpview[k] = v
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for _, epe := range eps {
|
for _, epe := range eps {
|
||||||
var ep endpoint
|
var ep endpoint
|
||||||
err := json.Unmarshal(epe.Value, &ep)
|
err := json.Unmarshal(epe.Value, &ep)
|
||||||
|
|
Loading…
Add table
Reference in a new issue