]> 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>
Thu, 11 Jul 2013 16:38:45 +0000 (10:38 -0600)
commit68d92eea16223d29627934a0169bff15795dda96
treec50cd23bff688cc7e2ffd15d56d3a82503d638b2
parente0dd41e564c2bf6bcb19dfd41fc69f2617002e2c
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.
(cherry picked from commit bbe97ae968eba60b71e0066d49f9fc909966d9d6)
src/qemu/qemu_cgroup.c
src/util/vircgroup.c