mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Log stale resource cleanup
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
613d0ff72a
commit
9c88ee206e
2 changed files with 3 additions and 1 deletions
|
@ -996,6 +996,7 @@ func (c *controller) cleanupLocalEndpoints() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, ep := range epl {
|
for _, ep := range epl {
|
||||||
|
log.Infof("Removing stale endpoint %s (%s)", ep.name, ep.id)
|
||||||
if err := ep.Delete(true); err != nil {
|
if err := ep.Delete(true); err != nil {
|
||||||
log.Warnf("Could not delete local endpoint %s during endpoint cleanup: %v", ep.name, err)
|
log.Warnf("Could not delete local endpoint %s during endpoint cleanup: %v", ep.name, err)
|
||||||
}
|
}
|
||||||
|
@ -1009,7 +1010,7 @@ func (c *controller) cleanupLocalEndpoints() {
|
||||||
|
|
||||||
epCnt := n.getEpCnt().EndpointCnt()
|
epCnt := n.getEpCnt().EndpointCnt()
|
||||||
if epCnt != uint64(len(epl)) {
|
if epCnt != uint64(len(epl)) {
|
||||||
log.Warnf("Inconsistent endpoint_cnt for network %s. Expected=%d, Actual=%d", n.name, len(epl), epCnt)
|
log.Infof("Fixing inconsistent endpoint_cnt for network %s. Expected=%d, Actual=%d", n.name, len(epl), epCnt)
|
||||||
n.getEpCnt().setCnt(uint64(len(epl)))
|
n.getEpCnt().setCnt(uint64(len(epl)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,6 +226,7 @@ func (c *controller) sandboxCleanup() {
|
||||||
heap.Push(&sb.endpoints, ep)
|
heap.Push(&sb.endpoints, ep)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrus.Infof("Removing stale sandbox %s (%s)", sb.id, sb.containerID)
|
||||||
if err := sb.delete(true); err != nil {
|
if err := sb.delete(true); err != nil {
|
||||||
logrus.Errorf("failed to delete sandbox %s while trying to cleanup: %v", sb.id, err)
|
logrus.Errorf("failed to delete sandbox %s while trying to cleanup: %v", sb.id, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue