virt-host-validate: Check those CGroups that we actually use

Since the introduction of virt-host-validate tool the set of
cgroup controllers we use has changed so the tool is checking for
some cgroups that we don't need (e.g. net_cls, although I doubt
we have ever used that one) and is not checking for those we
actually use (e.g. cpuset).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2016-01-24 15:11:32 +01:00
parent 9cbd1ecc3e
commit d55e11a302
2 changed files with 13 additions and 13 deletions

View File

@ -78,19 +78,19 @@ int virHostValidateLXC(void)
"CGROUP_CPUACCT") < 0)
ret = -1;
if (virHostValidateCGroupController("LXC", "cpuset",
VIR_HOST_VALIDATE_FAIL,
"CPUSETS") < 0)
ret = -1;
if (virHostValidateCGroupController("LXC", "devices",
VIR_HOST_VALIDATE_FAIL,
"CGROUP_DEVICE") < 0)
ret = -1;
if (virHostValidateCGroupController("LXC", "net_cls",
VIR_HOST_VALIDATE_WARN,
"NET_CLS_CGROUP") < 0)
ret = -1;
if (virHostValidateCGroupController("LXC", "freezer",
VIR_HOST_VALIDATE_WARN,
"CGROUP_FREEZER") < 0)
if (virHostValidateCGroupController("LXC", "blkio",
VIR_HOST_VALIDATE_FAIL,
"BLK_CGROUP") < 0)
ret = -1;
return ret;

View File

@ -74,16 +74,16 @@ int virHostValidateQEMU(void)
"CGROUP_CPUACCT") < 0)
ret = -1;
if (virHostValidateCGroupController("QEMU", "cpuset",
VIR_HOST_VALIDATE_WARN,
"CPUSETS") < 0)
ret = -1;
if (virHostValidateCGroupController("QEMU", "devices",
VIR_HOST_VALIDATE_WARN,
"CGROUP_DEVICES") < 0)
ret = -1;
if (virHostValidateCGroupController("QEMU", "net_cls",
VIR_HOST_VALIDATE_WARN,
"NET_CLS_CGROUP") < 0)
ret = -1;
if (virHostValidateCGroupController("QEMU", "blkio",
VIR_HOST_VALIDATE_WARN,
"BLK_CGROUP") < 0)