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>
(cherry picked from commit c6a2044497e0e1ff61350859c8572a2c31c17ced)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Brian Goff
2017-11-17 17:19:25 +01:00
committed by Sebastiaan van Stijn
parent 8916204beb
commit 66cbbe22db
+4 -1
View File
@@ -1298,7 +1298,10 @@ func setupDaemonProcess(config *config.Config) error {
if err := setupOOMScoreAdj(config.OOMScoreAdjust); err != nil {
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