Bug 1131919
Summary: | setmem doesn't take effect for lxc guest | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jincheng Miao <jmiao> |
Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, eskultet, lhuang, mzhan, rbalakri, yanyang, ydu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:47:48 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jincheng Miao
2014-08-20 09:48:59 UTC
Fixed upstream: commit c87f268a369eb0f275781abbf446731f6c23f522 Author: Erik Skultety <eskultet> Date: Fri Oct 24 11:17:20 2014 +0200 lxc: fix setmem effect on a running LXC machine When user calls setmem on a running LXC machine, we do update its cgroup entry, however we neither update domain's runtime XML nor we update our internal structures and this patch fixes it. v1.2.10-98-gc87f268 Verified on libvirt-1.2.15-1.el7.x86_64 Steps 1. prepare a lxc with following xml # virsh -c lxc:/// dumpxml helloworld <domain type='lxc' id='14079'> <name>helloworld</name> <uuid>ed1955f7-4e72-40ae-8265-c193e7436c8a</uuid> <memory unit='KiB'>102400</memory> <currentMemory unit='KiB'>1000</currentMemory> <vcpu placement='static' cpuset='1-3'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64'>exe</type> <init>/bin/sh</init> </os> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/'/> <target dir='/'/> </filesystem> <console type='pty' tty='/dev/pts/11'> <source path='/dev/pts/11'/> <target type='lxc' port='0'/> <alias name='console0'/> </console> </devices> <seclabel type='dynamic' model='selinux' relabel='yes'> <label>system_u:system_r:svirt_lxc_net_t:s0:c822,c883</label> <imagelabel>system_u:object_r:svirt_sandbox_file_t:s0:c822,c883</imagelabel> </seclabel> </domain> 2. check mem # virsh -c lxc:// dumpxml helloworld | grep -1 memory <uuid>ed1955f7-4e72-40ae-8265-c193e7436c8a</uuid> <memory unit='KiB'>102400</memory> <currentMemory unit='KiB'>102300</currentMemory> # virsh -c lxc:/// memtune helloworld hard_limit : 102400 soft_limit : unlimited swap_hard_limit: unlimited # virsh -c lxc:/// dommemstat helloworld actual 102300 swap_in 564 rss 564 3. set memory # virsh -c lxc:/// setmem helloworld 1000 # virsh -c lxc:// dumpxml helloworld | grep -1 memory <uuid>ed1955f7-4e72-40ae-8265-c193e7436c8a</uuid> <memory unit='KiB'>102400</memory> <currentMemory unit='KiB'>1000</currentMemory> # virsh -c lxc:/// memtune helloworld hard_limit : 1000 soft_limit : unlimited swap_hard_limit: unlimited # virsh -c lxc:/// dommemstat helloworld actual 1000 swap_in 564 rss 564 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/RHBA-2015-2202.html |