Explorar o código

Do not prevent docker from running when kernel detection fails

Guillaume J. Charmes %!s(int64=12) %!d(string=hai) anos
pai
achega
3514e47edc
Modificáronse 1 ficheiros con 7 adicións e 8 borrados
  1. 7 8
      runtime.go

+ 7 - 8
runtime.go

@@ -295,14 +295,13 @@ func NewRuntime() (*Runtime, error) {
 		return nil, err
 	}
 
-	k, err := GetKernelVersion()
-	if err != nil {
-		return nil, err
-	}
-	runtime.kernelVersion = k
-
-	if CompareKernelVersion(k, &KernelVersionInfo{Kernel: 3, Major: 8, Minor: 0}) < 0 {
-		log.Printf("WARNING: You are running linux kernel version %s, which might be unstable running docker. Please upgrade your kernel to 3.8.0.", k.String())
+	if k, err := GetKernelVersion(); err != nil {
+		log.Printf("WARNING: %s\n", err)
+	} else {
+		runtime.kernelVersion = k
+		if CompareKernelVersion(k, &KernelVersionInfo{Kernel: 3, Major: 8, Minor: 0}) < 0 {
+			log.Printf("WARNING: You are running linux kernel version %s, which might be unstable running docker. Please upgrade your kernel to 3.8.0.", k.String())
+		}
 	}
 
 	if cgroupMemoryMountpoint, err := FindCgroupMountpoint("memory"); err != nil {