mirror of
https://github.com/moby/moby.git
synced 2026-08-03 06:30:59 +00:00
Remove enpoint state from cluster on join failure
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
@@ -519,6 +519,14 @@ func (ep *endpoint) sbJoin(sb *sandbox, options ...EndpointOption) error {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if e := ep.deleteDriverInfoFromCluster(); e != nil {
|
||||
logrus.Errorf("Could not delete endpoint state for endpoint %s from cluster on join failure: %v", ep.Name(), e)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
if sb.needDefaultGW() && sb.getEndpointInGWNetwork() == nil {
|
||||
return sb.setupDefaultGW()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user