Browse code

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 authored on 2018/03/06 00:43:25
Showing 1 changed files
... ...
@@ -222,6 +222,8 @@ func (daemon *Daemon) releaseIngress(id string) {
222 222
 		return
223 223
 	}
224 224
 
225
+	daemon.deleteLoadBalancerSandbox(n)
226
+
225 227
 	if err := n.Delete(); err != nil {
226 228
 		logrus.Errorf("Failed to delete ingress network %s: %v", n.ID(), err)
227 229
 		return