浏览代码

Don't abort when setting may_detach_mounts

83c2152de503012195bd26069fd8fbd2dea4b32f sets the kernel param for
fs.may_detach_mounts, but this is not neccessary for the daemon to
operate. Instead of erroring out (and thus aborting startup) just log
the error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Brian Goff 7 年之前
父节点
当前提交
c6a2044497
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      daemon/daemon_unix.go

+ 4 - 1
daemon/daemon_unix.go

@@ -1300,7 +1300,10 @@ func setupDaemonProcess(config *config.Config) error {
 	if err := setupOOMScoreAdj(config.OOMScoreAdjust); err != nil {
 	if err := setupOOMScoreAdj(config.OOMScoreAdjust); err != nil {
 		return err
 		return err
 	}
 	}
-	return setMayDetachMounts()
+	if err := setMayDetachMounts(); err != nil {
+		logrus.WithError(err).Warn("Could not set may_detach_mounts kernel parameter")
+	}
+	return nil
 }
 }
 
 
 // This is used to allow removal of mountpoints that may be mounted in other
 // This is used to allow removal of mountpoints that may be mounted in other