mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Overlay driver to cleanup stale endpoints
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
e4957174ee
commit
46f525c7d6
4 changed files with 11 additions and 7 deletions
|
@ -83,9 +83,9 @@ func (d *driver) populateEndpoints() error {
|
|||
n, ok := d.networks[ep.nid]
|
||||
if !ok {
|
||||
logrus.Debugf("Network (%s) not found for restored bridge endpoint (%s)", ep.nid[0:7], ep.id[0:7])
|
||||
logrus.Debugf("Deleting stale bridge endpoint (%s) from store", ep.nid[0:7])
|
||||
logrus.Debugf("Deleting stale bridge endpoint (%s) from store", ep.id[0:7])
|
||||
if err := d.storeDelete(ep); err != nil {
|
||||
logrus.Debugf("Failed to delete stale bridge endpoint (%s) from store", ep.nid[0:7])
|
||||
logrus.Debugf("Failed to delete stale bridge endpoint (%s) from store", ep.id[0:7])
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -96,9 +96,9 @@ func (d *driver) populateEndpoints() error {
|
|||
n, ok := d.networks[ep.nid]
|
||||
if !ok {
|
||||
logrus.Debugf("Network (%s) not found for restored ipvlan endpoint (%s)", ep.nid[0:7], ep.id[0:7])
|
||||
logrus.Debugf("Deleting stale ipvlan endpoint (%s) from store", ep.nid[0:7])
|
||||
logrus.Debugf("Deleting stale ipvlan endpoint (%s) from store", ep.id[0:7])
|
||||
if err := d.storeDelete(ep); err != nil {
|
||||
logrus.Debugf("Failed to delete stale ipvlan endpoint (%s) from store", ep.nid[0:7])
|
||||
logrus.Debugf("Failed to delete stale ipvlan endpoint (%s) from store", ep.id[0:7])
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -96,9 +96,9 @@ func (d *driver) populateEndpoints() error {
|
|||
n, ok := d.networks[ep.nid]
|
||||
if !ok {
|
||||
logrus.Debugf("Network (%s) not found for restored macvlan endpoint (%s)", ep.nid[0:7], ep.id[0:7])
|
||||
logrus.Debugf("Deleting stale macvlan endpoint (%s) from store", ep.nid[0:7])
|
||||
logrus.Debugf("Deleting stale macvlan endpoint (%s) from store", ep.id[0:7])
|
||||
if err := d.storeDelete(ep); err != nil {
|
||||
logrus.Debugf("Failed to delete stale macvlan endpoint (%s) from store", ep.nid[0:7])
|
||||
logrus.Debugf("Failed to delete stale macvlan endpoint (%s) from store", ep.id[0:7])
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -111,7 +111,11 @@ func (d *driver) restoreEndpoints() error {
|
|||
ep := kvo.(*endpoint)
|
||||
n := d.network(ep.nid)
|
||||
if n == nil {
|
||||
logrus.Debugf("Network (%s) not found for restored endpoint (%s)", ep.nid, ep.id)
|
||||
logrus.Debugf("Network (%s) not found for restored endpoint (%s)", ep.nid[0:7], ep.id[0:7])
|
||||
logrus.Debugf("Deleting stale overlay endpoint (%s) from store", ep.id[0:7])
|
||||
if err := d.deleteEndpointFromStore(ep); err != nil {
|
||||
logrus.Debugf("Failed to delete stale overlay endpoint (%s) from store", ep.id[0:7])
|
||||
}
|
||||
continue
|
||||
}
|
||||
n.addEndpoint(ep)
|
||||
|
|
Loading…
Reference in a new issue