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>
(cherry picked from commit 3da4ebf355d3494d1403b2878a1ae6958b2724e9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Chris Telfer
2018-03-14 12:12:32 +01:00
committed by Sebastiaan van Stijn
parent 735514a077
commit 0825e477d8
+2
View File
@@ -222,6 +222,8 @@ func (daemon *Daemon) releaseIngress(id string) {
return
}
daemon.deleteLoadBalancerSandbox(n)
if err := n.Delete(); err != nil {
logrus.Errorf("Failed to delete ingress network %s: %v", n.ID(), err)
return