WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] tools: Fix xm mem-max command.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: Fix xm mem-max command.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:35 -0700
Delivery-date: Tue, 12 Jun 2007 05:06:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181298081 -3600
# Node ID 55230846b2f47147c65a54fb10825455f5e02c48
# Parent  656b8175f4f24b5bb3a761e62c496075510914ed
tools: Fix xm mem-max command.

When I tested xm mem-max and xm list, I saw the following error
message by xm list.  Because xm mem-max always changes
"memory_static_max", I think that the cause of the error message
is it.  This patch fixes it.

# xm list --long PVdomain.1 | grep mem
    (maxmem 1024)
    (memory 1024)
    (shadow_memory 0)
# xm mem-max PVdomain.1 512
Error: (22, 'Invalid argument')
Usage: xm mem-max <Domain> <Mem>

Set the maximum amount reservation for a domain.
# xm list --long PVdomain.1 | grep mem
Error: memory_dynamic_max must be less than or equal to
memory_static_max

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 656b8175f4f2 -r 55230846b2f4 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Jun 08 11:19:55 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Jun 08 11:21:21 2007 +0100
@@ -612,7 +612,7 @@ class XendDomainInfo:
             raise XendError('Invalid memory size')
 
         MiB = 1024 * 1024
-        self.info['memory_static_max'] = limit * MiB
+        self._safe_set_memory('memory_static_max', limit * MiB)
 
         if self.domid >= 0:
             maxmem = int(limit) * 1024

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: Fix xm mem-max command., Xen patchbot-unstable <=