From ac4b2905528457d9dba252c1590b9ac143372d0b Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Thu, 29 Oct 2015 11:25:53 -0700 Subject: [PATCH] Do not ignore errors from graphdriver.Put Signed-off-by: Alexander Morozov --- daemon/daemon.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index ec9a759f77..c181d7d676 100644 --- a/daemon/daemon.go +++ b/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