Browse code

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 authored on 2017/10/12 02:27:08
Showing 1 changed files
... ...
@@ -1300,7 +1300,10 @@ func setupDaemonProcess(config *config.Config) error {
1300 1300
 	if err := setupOOMScoreAdj(config.OOMScoreAdjust); err != nil {
1301 1301
 		return err
1302 1302
 	}
1303
-	return setMayDetachMounts()
1303
+	if err := setMayDetachMounts(); err != nil {
1304
+		logrus.WithError(err).Warn("Could not set may_detach_mounts kernel parameter")
1305
+	}
1306
+	return nil
1304 1307
 }
1305 1308
 
1306 1309
 // This is used to allow removal of mountpoints that may be mounted in other