Bug 528431 - [mem-set]it should not allow to set the current memory larger than max memory
Summary: [mem-set]it should not allow to set the current memory larger than max memory
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 5.6
Assignee: Miroslav Rezanina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
: 554940 575671 (view as bug list)
Depends On:
Blocks: 514500 608065 609561 609619
TreeView+ depends on / blocked
 
Reported: 2009-10-12 07:05 UTC by Rita Wu
Modified: 2013-07-03 01:35 UTC (History)
7 users (show)

(edit)
Clone Of:
: 608072 609619 (view as bug list)
(edit)
Last Closed: 2011-01-13 22:19:00 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0031 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-01-12 15:59:24 UTC

Description Rita Wu 2009-10-12 07:05:38 UTC
Description of problem:

It allows to set the current memory larger than max value 

Version-Release number of selected component (if applicable):
2.6.18-164.el5xen

How reproducible:
always

Steps to Reproduce:
Prerequisite: the default value of max memory and current memory is 512
1.Set current memory larger than max memory
  # xm mem-set $domain-id 1024
2.Reboot the domain
  #xm reboot $domain-id
3.Check whether current memory is updated by "xm list"
  #xm list $domain-id
4.Check whether current memory is updated by "xm list -l"
  #xm list $domain-id -l

  
Actual results:
After step4, the values of memory and maxmem are both updated to 1024.

Expected results:
It should not allow to set the current memory larger than max-memory

Additional info:

Comment 1 Yufang Zhang 2009-10-14 05:50:19 UTC
Another problem with this bug:

1. set memmax(via mem-max) to a new size(in this case 2048M) larger than the current memmax(in this case 512M)
2. set current memory size to be 1500M
3. reboot guest
4. After reboot, 
   # xm li $dom_id -l
we can see that both memory and mammem change to 1500M. mem-max doesn`t take effect after reboot in this case.

Additional infortmation:
According to BZ #528421, mem-max should take effect after reboot.

Comment 4 Miroslav Rezanina 2010-03-22 13:27:55 UTC
*** Bug 575671 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Rezanina 2010-04-16 16:15:37 UTC
*** Bug 554940 has been marked as a duplicate of this bug. ***

Comment 10 Yufang Zhang 2010-08-24 08:59:23 UTC
QA verify this bug on xen-3.0.3-115.el5:

1. # xm cr /tmp/xm-test.conf memory=512 maxmem=1024
Using config file "/tmp/xm-test.conf".
Using <class 'grub.GrubConf.GrubConfigFile'> to parse /grub/menu.lst
Started domain vm1

2. # xm mem-set vm1 1500
Error: Memory size too large. Limit is 1024 MiB
Usage: xm mem-set <Domain> <Mem>

Set the current memory usage for a domain.

3. # xm li vm1 
Name                                      ID Mem(MiB) VCPUs State   Time(s)
vm1                                       14      511     4 -b----      9.6

4. # xm li vm1 -l | grep mem
    (memory 512)
    (shadow_memory 0)
    (maxmem 1024)

5. # xm reboot vm1

6. # xm li vm1
Name                                      ID Mem(MiB) VCPUs State   Time(s)
vm1                                       15      512     4 -b----      0.4

7.  # xm li vm1 -l | grep mem
    (memory 512)
    (shadow_memory 0)
    (maxmem 1024)

Change this bug to VERIFIED.

Comment 12 errata-xmlrpc 2011-01-13 22:19:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0031.html


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