Procházet zdrojové kódy

Prevent ingress deletion when endpoint count == 1

We should not delete an ingress network just because its endpoint count
drops to 1 (the IP address of the sandbox).  This addresses a regression
where the ingress sandbox could be deleted on workers when the last
container leave said sandbox.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Chris Telfer před 7 roky
rodič
revize
d84f182717
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      libnetwork/network.go

+ 1 - 1
libnetwork/network.go

@@ -959,7 +959,7 @@ func (n *network) delete(force bool) error {
 
 	if len(n.loadBalancerIP) != 0 {
 		endpoints := n.Endpoints()
-		if force || len(endpoints) == 1 {
+		if force || (len(endpoints) == 1 && !n.ingress) {
 			n.deleteLoadBalancerSandbox()
 		}
 		//Reload the network from the store to update the epcnt.