Browse code

add devices cgroup check and errors

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>

Qiang Huang authored on 2015/04/14 09:38:34
Showing 1 changed files
... ...
@@ -58,5 +58,11 @@ func New(quiet bool) *SysInfo {
58 58
 	} else {
59 59
 		sysInfo.AppArmor = true
60 60
 	}
61
+
62
+	// Check if Devices cgroup is mounted, it is hard requirement for container security.
63
+	if _, err := cgroups.FindCgroupMountpoint("devices"); err != nil {
64
+		logrus.Fatalf("Error mounting devices cgroup: %v", err)
65
+	}
66
+
61 67
 	return sysInfo
62 68
 }