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] Fix xm save command for a inactive manage

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix xm save command for a inactive managed domain.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Jul 2007 04:26:10 -0700
Delivery-date: Mon, 09 Jul 2007 04:24:23 -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 1183970505 -3600
# Node ID 99143d572521c872f6d116a9f708b650bb2f8388
# Parent  107b9bde5e4d3487013441ec5ffb563d9a8b5414
Fix xm save command for a inactive managed domain.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |    6 +++++-
 tools/python/xen/xm/main.py         |    8 +-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff -r 107b9bde5e4d -r 99143d572521 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Jul 09 09:39:51 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Mon Jul 09 09:41:45 2007 +0100
@@ -1253,7 +1253,11 @@ class XendDomain:
                 raise XendInvalidDomain(str(domid))
 
             if dominfo.getDomid() == DOM0_ID:
-                raise XendError("Cannot save privileged domain %i" % domid)
+                raise XendError("Cannot save privileged domain %s" % 
str(domid))
+            if dominfo._stateGet() != DOM_STATE_RUNNING:
+                raise VMBadState("Domain is not running",
+                                 POWER_STATE_NAMES[DOM_STATE_RUNNING],
+                                 POWER_STATE_NAMES[dominfo._stateGet()])
 
             oflags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
             if hasattr(os, "O_LARGEFILE"):
diff -r 107b9bde5e4d -r 99143d572521 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Mon Jul 09 09:39:51 2007 +0100
+++ b/tools/python/xen/xm/main.py       Mon Jul 09 09:41:45 2007 +0100
@@ -700,13 +700,7 @@ def xm_save(args):
     if serverType == SERVER_XEN_API:       
         server.xenapi.VM.save(get_single_vm(dom), savefile, checkpoint)
     else:
-        try:
-            dominfo = parse_doms_info(server.xend.domain(dom))
-        except xmlrpclib.Fault, ex:
-            raise ex
-    
-        domid = dominfo['domid']
-        server.xend.domain.save(domid, savefile, checkpoint)
+        server.xend.domain.save(dom, savefile, checkpoint)
     
 def xm_restore(args):
     arg_check(args, "restore", 1, 2)

_______________________________________________
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] Fix xm save command for a inactive managed domain., Xen patchbot-unstable <=