mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Reset endpoint port info on connectivity revoke in bridge driver
- and update it to store. Otherwise after an ungraceful shutdown, at next boot there will be in store two bridge endpoints with same port-mapping data. When bridge driver will try to restore the endpoints, there will be conflicts and a container with restart policy could fail to start. Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
eb02cb999b
commit
cff2573d1f
1 changed files with 6 additions and 0 deletions
|
@ -1318,6 +1318,12 @@ func (d *driver) RevokeExternalConnectivity(nid, eid string) error {
|
|||
logrus.Warn(err)
|
||||
}
|
||||
|
||||
endpoint.portMapping = nil
|
||||
|
||||
if err = d.storeUpdate(endpoint); err != nil {
|
||||
return fmt.Errorf("failed to update bridge endpoint %s to store: %v", endpoint.id[0:7], err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue