From: Michal Privoznik Date: Sun, 24 Jan 2016 14:11:32 +0000 (+0100) Subject: virt-host-validate: Check those CGroups that we actually use X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d55e11a3020fa2bfd941409772d74f63aa6a30c3;p=libvirt.git 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 --- diff --git a/tools/virt-host-validate-lxc.c b/tools/virt-host-validate-lxc.c index 48323da3b5..e604f837dd 100644 --- a/tools/virt-host-validate-lxc.c +++ b/tools/virt-host-validate-lxc.c @@ -78,19 +78,19 @@ int virHostValidateLXC(void) "CGROUP_CPUACCT") < 0) ret = -1; - if (virHostValidateCGroupController("LXC", "devices", + if (virHostValidateCGroupController("LXC", "cpuset", VIR_HOST_VALIDATE_FAIL, - "CGROUP_DEVICE") < 0) + "CPUSETS") < 0) ret = -1; - if (virHostValidateCGroupController("LXC", "net_cls", - VIR_HOST_VALIDATE_WARN, - "NET_CLS_CGROUP") < 0) + if (virHostValidateCGroupController("LXC", "devices", + VIR_HOST_VALIDATE_FAIL, + "CGROUP_DEVICE") < 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; diff --git a/tools/virt-host-validate-qemu.c b/tools/virt-host-validate-qemu.c index 044df65b02..a9f6c1e1f8 100644 --- a/tools/virt-host-validate-qemu.c +++ b/tools/virt-host-validate-qemu.c @@ -74,14 +74,14 @@ int virHostValidateQEMU(void) "CGROUP_CPUACCT") < 0) ret = -1; - if (virHostValidateCGroupController("QEMU", "devices", + if (virHostValidateCGroupController("QEMU", "cpuset", VIR_HOST_VALIDATE_WARN, - "CGROUP_DEVICES") < 0) + "CPUSETS") < 0) ret = -1; - if (virHostValidateCGroupController("QEMU", "net_cls", + if (virHostValidateCGroupController("QEMU", "devices", VIR_HOST_VALIDATE_WARN, - "NET_CLS_CGROUP") < 0) + "CGROUP_DEVICES") < 0) ret = -1; if (virHostValidateCGroupController("QEMU", "blkio",