Browse Source

Delete the load balancer endpoint in Ingress nets

Ingress networks will no longer automatically remove their
load-balancing endpoint (and sandbox) automatically when the network is
otherwise upopulated.   This is to prevent automatic removal of the
ingress networks when all the containers leave them.  Therefore
explicit removal of an ingress network also requires explicit removal
of its load-balancing endpoint.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Chris Telfer 7 years ago
parent
commit
3da4ebf355
1 changed files with 2 additions and 0 deletions
  1. 2 0
      daemon/network.go

+ 2 - 0
daemon/network.go

@@ -222,6 +222,8 @@ func (daemon *Daemon) releaseIngress(id string) {
 		return
 		return
 	}
 	}
 
 
+	daemon.deleteLoadBalancerSandbox(n)
+
 	if err := n.Delete(); err != nil {
 	if err := n.Delete(); err != nil {
 		logrus.Errorf("Failed to delete ingress network %s: %v", n.ID(), err)
 		logrus.Errorf("Failed to delete ingress network %s: %v", n.ID(), err)
 		return
 		return