mirror of https://github.com/docker/docs.git
				
				
				
			Fixing a stale endpoint issue that blocks ingress network cleanup
fixes #24400 Signed-off-by: Madhu Venugopal <madhu@docker.com> (cherry picked from commit a4926a4d92eb7940d079de01d7fafe43060fcd56) Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
		
							parent
							
								
									6ce4e9b50c
								
							
						
					
					
						commit
						9a0e0cccfe
					
				| 
						 | 
				
			
			@ -127,6 +127,14 @@ func (daemon *Daemon) SetupIngress(create clustertypes.NetworkCreateRequest, nod
 | 
			
		|||
				return
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Cleanup any stale endpoints that might be left over during previous iterations
 | 
			
		||||
			epList := n.Endpoints()
 | 
			
		||||
			for _, ep := range epList {
 | 
			
		||||
				if err := ep.Delete(true); err != nil {
 | 
			
		||||
					logrus.Errorf("Failed to delete endpoint %s (%s): %v", ep.Name(), ep.ID(), err)
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if err := n.Delete(); err != nil {
 | 
			
		||||
				logrus.Errorf("Failed to delete stale ingress network %s: %v", n.ID(), err)
 | 
			
		||||
				return
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue