summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2016-04-15 14:33:56 +0200
committerSebastiaan van Stijn <github@gone.nl>2016-04-15 14:33:56 +0200
commit51b23d88422918c24291f5876df35f91b23a446a (patch)
tree2ae649e02f1bc1f3b593b112bb0c82eee64c722c
parent172ca1ca8c4d5157789feb97a6424104b81a3479 (diff)
downloaddocker-51b23d88422918c24291f5876df35f91b23a446a.tar.gz
Produce fatal error when running on kernel < 3.10.0
Running on kernel versions older than 3.10 has not been supported for a while (as it's known to be unstable). With the containerd integration, this has become more apparent, because kernels < 3.4 don't support PR_SET_CHILD_SUBREAPER, which is required for containerd-shim to run. Change the previous "warning" to a "fatal" error, so that we refuse to start. There's still an escape-hatch for users by setting "DOCKER_NOWARN_KERNEL_VERSION=1" so that they can run "at their own risk". Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r--daemon/daemon_unix.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go
index ae0fa35cfc..ce59adbd3c 100644
--- a/daemon/daemon_unix.go
+++ b/daemon/daemon_unix.go
@@ -267,10 +267,12 @@ func checkKernel() error {
// without actually causing a kernel panic, so we need this workaround until
// the circumstances of pre-3.10 crashes are clearer.
// For details see https://github.com/docker/docker/issues/407
+ // Docker 1.11 and above doesn't actually run on kernels older than 3.4,
+ // due to containerd-shim usage of PR_SET_CHILD_SUBREAPER (introduced in 3.4).
if !checkKernelVersion(3, 10, 0) {
v, _ := kernel.GetKernelVersion()
if os.Getenv("DOCKER_NOWARN_KERNEL_VERSION") == "" {
- logrus.Warnf("Your Linux kernel version %s can be unstable running docker. Please upgrade your kernel to 3.10.0.", v.String())
+ logrus.Fatalf("Your Linux kernel version %s is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer.", v.String())
}
}
return nil