Bug 1045448 - memtune does not work for running domain (cgroup memory controller is not mounted)
Summary: memtune does not work for running domain (cgroup memory controller is not mou...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-20 12:42 UTC by akotov
Modified: 2018-12-04 16:45 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 911997
Environment:
Last Closed: 2014-01-08 15:28:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description akotov 2013-12-20 12:42:59 UTC
Description of problem: error: Requested operation is not valid: cgroup memory controller is not mounted
 
[root@localhost network-scripts]# virsh list
 Id    Name                           State
----------------------------------------------------
 5     a                              running

[root@localhost network-scripts]# virsh memtune a
error: Unable to get number of memory parameters
error: Requested operation is not valid: cgroup memory controller is not mounted

[root@localhost network-scripts]# virsh memtune a --hard-limit 512000
error: Unable to change memory parameters



Version-Release number of selected component (plus see additional info)
libvirt-python-0.10.2-29.el6_5.2.x86_64
libvirt-client-0.10.2-29.el6_5.2.x86_64
libvirt-0.10.2-29.el6_5.2.x86_64

How reproducible:
always

Steps to Reproduce:
1. Start a guest
2. Try to apply memtune

  
Actual results:
error: Unable to change memory parameters

Expected results:

>>  virsh # list
>>   Id Name                 State
>>  ----------------------------------
>>    4 Fedora_14_x64        running
>> 
>>  virsh # memtune Fedora_14_x64
>>  hard_limit     : 9007199254740991
>>  soft_limit     : 9007199254740991
>>  swap_hard_limit: 9007199254740991


Additional info:

Customer faced the issue on RHEL 6.3

libvirt-0.9.10-21.el6_3.4.x86_64                            Fri 24 May 2013 10:55:54 AM CEST
libvirt-client-0.9.10-21.el6_3.4.x86_64                     Fri 24 May 2013 10:55:53 AM CEST
libvirt-python-0.9.10-21.el6_3.4.x86_64                     Fri 24 May 2013 10:56:54 AM CEST
gpxe-roms-qemu-0.9.7-6.9.el6.noarch                         Wed 15 May 2013 12:10:44 PM CEST
qemu-img-0.12.1.2-2.295.el6_3.2.x86_64                      Wed 15 May 2013 10:53:26 AM CEST
qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64                      Wed 15 May 2013 12:10:45 PM CEST

I have reproduced it on RHEL 6.4

[root@localhost network-scripts]# rpm -qa | grep libvirt
libvirt-python-0.10.2-29.el6_5.2.x86_64
libvirt-client-0.10.2-29.el6_5.2.x86_64
libvirt-0.10.2-29.el6_5.2.x86_64
[root@localhost network-scripts]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.4 (Santiago)

---
rmcswain noted, that it works for him on 6.5

Comment 1 Daniel Berrangé 2013-12-20 12:56:22 UTC
Well the obvious first question here is  are cgroups mounted ? Please provide the /proc/mounts content for the machine showing the problem.

Comment 8 Daniel Berrangé 2013-12-20 13:16:49 UTC
Ok, so cgroups is mounted which means what likely happened here is that either libvirtd or the VM, or both were started before the cgroups were mounted. Libvirtd only detects cgroup mounts when it starts up. So if you later mount cgroups you must restart libvirtd and any VMs that were running. So if they can confirm that restarting libvirtd + all VMs makes it work, this this is NOTABUG.

Comment 11 Jiri Denemark 2014-01-06 09:50:40 UTC
Could you turn on libvirt debug logs (see http://wiki.libvirt.org/page/DebugLogs) and run the following commands

# cat /proc/mounts
# service libvirtd restart

and attach the result of the first command and libvirtd.log with debug logs generated by the second command?

Comment 14 Jiri Denemark 2014-01-08 15:28:18 UTC
OK, so the log does not mention any cgroup controller to be enabled in qemu configuration and indeed looking at /etc/libvirt/qemu.conf:

cgroup_controllers = [ ]

In other words, they explicitly disabled all cgroups for qemu driver...


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