Ignore os.IsNotExist errors when calling ToDiskLocking
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com> Upstream-commit: 606cf5310d20518b4a9dfbe4d8e6b872f8683d9e Component: engine
This commit is contained in:
@@ -102,7 +102,7 @@ func (daemon *Daemon) cleanupContainer(container *container.Container, forceRemo
|
||||
// Save container state to disk. So that if error happens before
|
||||
// container meta file got removed from disk, then a restart of
|
||||
// docker should not make a dead container alive.
|
||||
if err := container.ToDiskLocking(); err != nil {
|
||||
if err := container.ToDiskLocking(); err != nil && !os.IsNotExist(err) {
|
||||
logrus.Errorf("Error saving dying container to disk: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user