Fixing a stale endpoint issue that blocks ingress network cleanup
fixes #24400
Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit a4926a4d92
)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
6ce4e9b50c
commit
9a0e0cccfe
1 changed files with 8 additions and 0 deletions
|
@ -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 a new issue