]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix starting domains when kernel has no cgroups support
authorJim Fehlig <jfehlig@suse.com>
Fri, 10 May 2013 18:05:00 +0000 (12:05 -0600)
committerJim Fehlig <jfehlig@suse.com>
Mon, 13 May 2013 15:27:46 +0000 (09:27 -0600)
commitbbe97ae968eba60b71e0066d49f9fc909966d9d6
treeb779713cba2f21410b4295c8f56dd91e8116bf09
parenta011479d47ea4894cd091a9d10ebd4251dddf483
Fix starting domains when kernel has no cgroups support

Found that I was unable to start existing domains after updating
to a kernel with no cgroups support

  # zgrep CGROUP /proc/config.gz
  # CONFIG_CGROUPS is not set
  # virsh start test
  error: Failed to start domain test
  error: Unable to initialize /machine cgroup: Cannot allocate memory

virCgroupPartitionNeedsEscaping() correctly returns errno (ENOENT) when
attempting to open /proc/cgroups on such a system, but it was being
dropped in virCgroupSetPartitionSuffix().

Change virCgroupSetPartitionSuffix() to propagate errors returned by
its callees.  Also check for ENOENT in qemuInitCgroup() when determining
if cgroups support is available.
src/qemu/qemu_cgroup.c
src/util/vircgroup.c