Browse Source

Ignore os.IsNotExist errors when calling ToDiskLocking

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Shishir Mahajan 9 năm trước cách đây
mục cha
commit
606cf5310d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      daemon/delete.go

+ 1 - 1
daemon/delete.go

@@ -102,7 +102,7 @@ func (daemon *Daemon) cleanupContainer(container *container.Container, forceRemo
 	// Save container state to disk. So that if error happens before
 	// Save container state to disk. So that if error happens before
 	// container meta file got removed from disk, then a restart of
 	// container meta file got removed from disk, then a restart of
 	// docker should not make a dead container alive.
 	// 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)
 		logrus.Errorf("Error saving dying container to disk: %v", err)
 	}
 	}