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 589832 - [LXC] Changing current memory works for shutoff guest
Summary: [LXC] Changing current memory works for shutoff guest
Keywords:
Status: CLOSED DUPLICATE of bug 586361
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-07 03:24 UTC by zhanghaiyan
Modified: 2010-12-15 05:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-10 09:05:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhanghaiyan 2010-05-07 03:24:06 UTC
Description of problem:
Could change current memory for rhel6 lxc shutoff guest, which should be NOT allowed according to https://bugzilla.redhat.com/show_bug.cgi?id=572474#c5

Version-Release number of selected component (if applicable):
rhel6-server-i386
kernel-2.6.32-24.el6.i686
libvirt-0.8.1-1.el6.i686

How reproducible:
Always

Steps to Reproduce:
1. # virsh define vm1.xml
2. # virsh list --all
 Id Name                 State
----------------------------------
  - vm1                  shut off
3. # virsh dumpxml vm1
<domain type='lxc'>
  <name>vm1</name>
  <uuid>386f5b25-43ee-9d62-4ce2-58c3809e47c1</uuid>
  <memory>400000</memory>
  <currentMemory>300000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='i686'>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>
    <interface type='network'>
      <mac address='52:54:00:f2:2c:ac'/>
      <source network='default'/>
      <target dev='veth0'/>
    </interface>
    <console type='pty'>
      <target port='0'/>
    </console>
  </devices>
</domain>
4. # virsh setmem vm1 350000
5. # virsh dumpxml vml
<domain type='lxc'>
  <name>vm1</name>
  <uuid>386f5b25-43ee-9d62-4ce2-58c3809e47c1</uuid>
  <memory>400000</memory>
  <currentMemory>350000</currentMemory>
  <vcpu>1</vcpu>
..............
6. # virsh start vm1
Domain vm1 started
7. # virsh dumpxml vm1
<domain type='lxc' id='3380'>
  <name>vm1</name>
  <uuid>386f5b25-43ee-9d62-4ce2-58c3809e47c1</uuid>
  <memory>400000</memory>
  <currentMemory>350000</currentMemory>
  <vcpu>1</vcpu>
...........

  
Actual results:
After step4, shutoff guest current memory is changed successfully.

Expected results:
Should not allow to change shutoff guest current memory

Additional info:

Comment 2 RHEL Program Management 2010-05-07 05:26:05 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 dyuan 2010-05-10 08:04:50 UTC
arch:x86_64, use '-c lxc', the result is different from i386.

# virsh -c lxc:///

virsh # list --all
 Id Name                 State
----------------------------------
  - toy                  shut off

virsh # setmem toy 300000
error: Requested operation is not valid: Domain is not running

Comment 4 Jiri Denemark 2010-05-10 08:58:24 UTC
> arch:x86_64, use '-c lxc', the result is different from i386.
> 
> # virsh -c lxc:///
> 
> virsh # list --all
>  Id Name                 State
> ----------------------------------
>   - toy                  shut off
> 
> virsh # setmem toy 300000
> error: Requested operation is not valid: Domain is not running    

I guess you have a newer libvirt (libvirt-0.8.1-2.el6), right?

Comment 5 Jiri Denemark 2010-05-10 09:05:23 UTC
This was already fixed by the patch set which improved error handling in lxc driver (bug 586361)

*** This bug has been marked as a duplicate of bug 586361 ***

Comment 6 zhanghaiyan 2010-05-11 07:22:37 UTC
This bug is verified PASS with libvirt-0.8.1-2.el6.i686 by lxc on
rhel6-server-i386 (kernel-2.6.32-24.el6.i686)


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