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-3.2-testing] Fix xm mem-max command to restore prev

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] Fix xm mem-max command to restore previous setting if
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Mar 2008 00:30:49 -0800
Delivery-date: Thu, 06 Mar 2008 00:31:07 -0800
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204733699 0
# Node ID 94498a5d9ce01dcf37033bb8906096e6171fd6c8
# Parent  580029bd9dce8d3b9e544351b7a68b7fa7f12dc4
Fix xm mem-max command to restore previous setting if
xc.domain_setmaxmem fails.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
xen-unstable changeset:   17125:450be98ef36b1af40ab381d8e0aac647012a60a2
xen-unstable date:        Tue Feb 26 15:02:26 2008 +0000
---
 tools/python/xen/xend/XendDomainInfo.py |    2 ++
 1 files changed, 2 insertions(+)

diff -r 580029bd9dce -r 94498a5d9ce0 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Mar 05 16:14:35 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Mar 05 16:14:59 2008 +0000
@@ -711,6 +711,7 @@ class XendDomainInfo:
         if limit <= 0:
             raise XendError('Invalid memory size')
 
+        maxmem_cur = self.get_memory_static_max()
         MiB = 1024 * 1024
         self._safe_set_memory('memory_static_max', limit * MiB)
 
@@ -719,6 +720,7 @@ class XendDomainInfo:
             try:
                 return xc.domain_setmaxmem(self.domid, maxmem)
             except Exception, ex:
+                self._safe_set_memory('memory_static_max', maxmem_cur)
                 raise XendError(str(ex))
         xen.xend.XendDomain.instance().managed_config_save(self)
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] Fix xm mem-max command to restore previous setting if, Xen patchbot-3.2-testing <=