mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Allow reattempt of overlay network sbox join
- if failure happened during restore endpoint phase Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
e42fca1872
commit
4f8c645173
1 changed files with 14 additions and 1 deletions
|
@ -90,7 +90,20 @@ func Init(dc driverapi.DriverCallback, config map[string]interface{}) error {
|
|||
}
|
||||
}
|
||||
|
||||
d.restoreEndpoints()
|
||||
if err := d.restoreEndpoints(); err != nil {
|
||||
logrus.Warnf("Failure during overlay endpoints restore: %v", err)
|
||||
}
|
||||
|
||||
// If an error happened when the network join the sandbox during the endpoints restore
|
||||
// we should reset it now along with the once variable, so that subsequent endpoint joins
|
||||
// outside of the restore path can potentially fix the network join and succeed.
|
||||
for nid, n := range d.networks {
|
||||
if n.initErr != nil {
|
||||
logrus.Infof("resetting init error and once variable for network %s after unsuccesful endpoint restore: %v", nid, n.initErr)
|
||||
n.initErr = nil
|
||||
n.once = &sync.Once{}
|
||||
}
|
||||
}
|
||||
|
||||
return dc.RegisterDriver(networkType, d, c)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue