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 748354 - [lxc]setmem will get wrong error message when cgroup is unmounted.
Summary: [lxc]setmem will get wrong error message when cgroup is unmounted.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-24 08:56 UTC by zhpeng
Modified: 2013-09-09 00:03 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 06:35:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description zhpeng 2011-10-24 08:56:00 UTC
Description of problem:
setmem will get wrong error message when cgroup is unmounted.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-19.el6.x86_64
qemu-kvm-0.12.1.2-2.196.el6.x86_64
kernel-2.6.32-207.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. make sure a running lxc application container and cgroup is mounted.
2. virsh -c lxc:/// aaa list
    Id Name                 State
   ----------------------------------
   6182 aaa                  running

   virsh -c lxc:/// aaa aaa
   Id:             6182
   Name:           aaa
   UUID:           c2031d50-8629-00a5-c895-f3b3c2f7b96a
   OS Type:        exe
   State:          running
   CPU(s):         1
   CPU time:       0.0s
   Max memory:     1048576 kB
   Used memory:    428 kB
   Persistent:     yes
   Autostart:      disable
   Managed save:   unknown
3. unmount cgroup
   # /etc/init.d/cgconfig stop
   # /etc/init.d/libvirtd restart
   # lscgroup
     cgroups can't be listed: Cgroup is not mounted
4. setmem of the lxc guest
   # virsh -c lxc:/// setmem aaa 512000
   error:this function is not supported by the connection driver: cgroups must be configured on the host

   # virsh -c lxc:/// dominfo aaa
   Id:             6182
   Name:           aaa
   UUID:           c2031d50-8629-00a5-c895-f3b3c2f7b96a
   OS Type:        exe
   State:          running
   CPU(s):         1
   Max memory:     1048576 kB
   Used memory:    1048576 kB
   Persistent:     yes
   Autostart:      disable
   Managed save:   unknown

in debug info:

Actual results:
Step4 error message is incorrect.

Expected results:
The error is not right, *_OPERATION_INVALID is proper error code, but
the more sensiable error from cgroup detection is overridden, we need
the error from cgroup detection but not this one.

Comment 1 Alex Jia 2011-10-24 09:04:33 UTC
Patch for upstream, but hasn't been backported to rhel6.2:

commit 6ac47762bb9c3851b07eaa871bfaf7ccd6017147
Author: Osier Yang <jyang>
Date:   Tue Aug 23 16:17:10 2011 +0800

    lxc: Cleanup improper VIR_ERR_NO_SUPPORT use
    
    s/VIR_ERR_NO_SUPPORT/VIR_ERR_OPERATION_INVALID/
    
    Special case is changes on lxcDomainInterfaceStats, if it's not
    implemented on the platform, prints error like:
    
        lxcError(VIR_ERR_OPERATION_INVALID, "%s",
                 _("interface stats not implemented on this platform"));
    
    As the function is supported by driver actually, error like
    VIR_ERR_NO_SUPPORT is confused.

Comment 2 Osier Yang 2011-12-12 07:48:49 UTC
This is already fixed in upstream, move to POST.

Comment 4 Alex Jia 2012-01-10 10:20:31 UTC
The bug has been fixed on libvirt-0.9.9-1.el6.x86_64:

# virsh -c lxc:/// setmem toy 400000
error: Requested operation is not valid: cgroups must be configured on the host

Comment 5 Osier Yang 2012-05-04 07:42:01 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 7 errata-xmlrpc 2012-06-20 06:35:51 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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


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