Fixing a stale endpoint issue that blocks ingress network cleanup
fixes #24400 Signed-off-by: Madhu Venugopal <madhu@docker.com> Upstream-commit: a4926a4d92eb7940d079de01d7fafe43060fcd56 Component: engine
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user