From 66cbbe22db14b11eee81b8263f8a6bb7b6054703 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Wed, 11 Oct 2017 13:27:08 -0400 Subject: [PATCH] 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 (cherry picked from commit c6a2044497e0e1ff61350859c8572a2c31c17ced) Signed-off-by: Sebastiaan van Stijn --- components/engine/daemon/daemon_unix.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/engine/daemon/daemon_unix.go b/components/engine/daemon/daemon_unix.go index fdb0f0a2a5..80d8d55a80 100644 --- a/components/engine/daemon/daemon_unix.go +++ b/components/engine/daemon/daemon_unix.go @@ -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