Red Hat Bugzilla – Bug 1097028
Don't fail starting domain without cpu, cpuset and cpuacct cgroups controllers
Last modified: 2015-03-05 02:35:18 EST
Description of problem: improve the error info when cgroup controller cpu, cpuset and cpuacct are unmounted Version-Release number of selected component (if applicable): libvirt-1.1.1-29.el7.x86_64 kernel-3.10.0-110.el7.x86_64 libcgroup-0.41-6.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare an guest #virsh list --all # virsh list --all Id Name State ---------------------------------------------------- - rhel6-qcow2 shut off 2. umount cgroup controller # for i in hugetlb perf_event blkio net_cls freezer devices memory cpu,cpuacct cpuset ;do umount /sys/fs/cgroup/$i;done # mount|grep cgroup tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) 3. start guest # virsh start rhel6-qcow2 error: Failed to start domain rhel6-qcow2 error: At least one cgroup controller is required: No such device or address 4. mount some controller then try to start guest # mount -t cgroup -o memory memory /sys/fs/cgroup/memory/ # mount|grep cgroup tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) memory on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory) # virsh start rhel6-qcow2 error: Failed to start domain rhel6-qcow2 error: At least one cgroup controller is required: No such device or address 5. mount cpu or cpuacct or cpuset, then restart guest #mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu/ # mount|grep cgroup tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) cpu on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,relatime,cpu) # virsh start rhel6-qcow2 Domain rhel6-qcow2 started Actual results: Expected results: At least cpu or cpuacct or cpuset or cgroup controller is required to boot up guest Additional info:
Fixed upstream with v1.2.6-115-g0c04906: commit 0c04906fa8872e4f7cdb19f59cbcb26b9bd02b0e Author: Martin Kletzander <mkletzan@redhat.com> Date: Wed Jul 9 09:55:29 2014 +0200 qemu: don't error out when cgroups don't exist
Martin, According your patch, guest will boot up even without cgroup controller cpu or cpuset, so verify steps should be 1)umount cgroup controller cpu, cpuset,2) boot up guest without any error. And bug description should be also change to something like "Guest should be boot up even without cgroup controller cpu or cpuset". Is that right?
Yes, you should be able to boot normally unless there are some settings which require some missing cgroups.
Verify this bug with libvirt-1.2.8-7.el7.x86_64 Steps: 1. umount all sub cgroup # lscgroup cgroups can't be listed: Cgroup is not mounted 2. try to start guest # virsh start rh7 Domain rh7 started 3. check guest status # virsh domstate rh7 running Guest can boot up without cpu, cpuset and cpuacct cgroups so change to verified status
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0323.html