RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1097028 - Don't fail starting domain without cpu, cpuset and cpuacct cgroups controllers
Summary: Don't fail starting domain without cpu, cpuset and cpuacct cgroups controllers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-13 03:07 UTC by Shanzhi Yu
Modified: 2015-03-05 07:35 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:35:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Shanzhi Yu 2014-05-13 03:07:25 UTC
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:

Comment 1 Martin Kletzander 2014-07-09 13:11:42 UTC
Fixed upstream with v1.2.6-115-g0c04906:

commit 0c04906fa8872e4f7cdb19f59cbcb26b9bd02b0e
Author: Martin Kletzander <mkletzan>
Date:   Wed Jul 9 09:55:29 2014 +0200

    qemu: don't error out when cgroups don't exist

Comment 2 Shanzhi Yu 2014-07-10 07:25:00 UTC
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?

Comment 3 Martin Kletzander 2014-07-10 07:30:37 UTC
Yes, you should be able to boot normally unless there are some settings which require some missing cgroups.

Comment 5 Shanzhi Yu 2014-11-20 07:20:37 UTC
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

Comment 7 errata-xmlrpc 2015-03-05 07:35:18 UTC
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


Note You need to log in before you can comment on or make changes to this bug.