浏览代码

Merge pull request #29459 from yongtang/29365-follow-up

Allow containers to continue even if mount failed after live restore
Sebastiaan van Stijn 8 年之前
父节点
当前提交
110a95717d
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      daemon/daemon.go

+ 7 - 2
daemon/daemon.go

@@ -150,8 +150,13 @@ func (daemon *Daemon) restore() error {
 			}
 			container.RWLayer = rwlayer
 			if err := daemon.Mount(container); err != nil {
-				logrus.Errorf("Failed to mount container %v: %v", id, err)
-				continue
+				// The mount is unlikely to fail. However, in case mount fails
+				// the container should be allowed to restore here. Some functionalities
+				// (like docker exec -u user) might be missing but container is able to be
+				// stopped/restarted/removed.
+				// See #29365 for related information.
+				// The error is only logged here.
+				logrus.Warnf("Failed to mount container %v: %v", id, err)
 			}
 			logrus.Debugf("Loaded container %v", container.ID)