add devices cgroup check and errors
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
1ad5a79e51
commit
c0dc426757
1 changed files with 6 additions and 0 deletions
|
@ -58,5 +58,11 @@ func New(quiet bool) *SysInfo {
|
|||
} else {
|
||||
sysInfo.AppArmor = true
|
||||
}
|
||||
|
||||
// Check if Devices cgroup is mounted, it is hard requirement for container security.
|
||||
if _, err := cgroups.FindCgroupMountpoint("devices"); err != nil {
|
||||
logrus.Fatalf("Error mounting devices cgroup: %v", err)
|
||||
}
|
||||
|
||||
return sysInfo
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue