Browse Source

Do not ignore errors from graphdriver.Put

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Alexander Morozov 9 năm trước cách đây
mục cha
commit
ac4b290552
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      daemon/daemon.go

+ 6 - 2
daemon/daemon.go

@@ -992,13 +992,17 @@ func (daemon *Daemon) createRootfs(container *Container) error {
 	}
 
 	if err := setupInitLayer(initPath, rootUID, rootGID); err != nil {
-		daemon.driver.Put(initID)
+		if err := daemon.driver.Put(initID); err != nil {
+			logrus.Errorf("Failed to Put init layer: %v", err)
+		}
 		return err
 	}
 
 	// We want to unmount init layer before we take snapshot of it
 	// for the actual container.
-	daemon.driver.Put(initID)
+	if err := daemon.driver.Put(initID); err != nil {
+		return err
+	}
 
 	if err := daemon.driver.Create(container.ID, initID); err != nil {
 		return err