When cgroup controller cpu, cpuset and cpuacct are all unmounted,
fail to start guest. The error info is not accurate. It will report
"At least one cgroup controller is required" even though there is
cgroup controller memory or blkio.
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
src/util/vircgroup.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index fce380a..c609eb3 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -586,6 +586,11 @@ virCgroupDetect(virCgroupPtr group,
if (!group->controllers[i].mountPoint) {
VIR_DEBUG("Requested controller '%s' not mounted,
ignoring",
virCgroupControllerTypeToString(i));
+ if ( i==2 ) {
+ virReportSystemError(ENXIO, "%s",
+ _("At least one cgroup controller cpu or
cpuacct or cpuset is required"));
+ return -1;
+ }
controllers &= ~(1 << i);
}
} else {
--
1.8.3.1