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] [XEND/XM] Improve error reporting in 'xm

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND/XM] Improve error reporting in 'xm restore'.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:15:51 -0700
Delivery-date: Mon, 04 Jun 2007 03:17:19 -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 1180084996 -3600
# Node ID 9073caff4b63490bc63bbe2b0b48fd06cc47d6c6
# Parent  546044bfd49fea0a9cb5e8aa896ffcc379ebfd4d
[XEND/XM] Improve error reporting in 'xm restore'.
From: Mats Petersson <Mats.Petersson@xxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |    3 +++
 tools/python/xen/xm/main.py         |   11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff -r 546044bfd49f -r 9073caff4b63 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Fri May 25 10:17:43 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Fri May 25 10:23:16 2007 +0100
@@ -1088,6 +1088,9 @@ class XendDomain:
 
         try:
             return XendCheckpoint.restore(self, fd, paused=paused)
+        except XendError, e:
+            log.exception("Restore failed")
+            raise
         except:
             # I don't really want to log this exception here, but the error
             # handling in the relocation-socket handling code (relocate.py) is
diff -r 546044bfd49f -r 9073caff4b63 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Fri May 25 10:17:43 2007 +0100
+++ b/tools/python/xen/xm/main.py       Fri May 25 10:23:16 2007 +0100
@@ -732,10 +732,13 @@ def xm_restore(args):
         err("xm restore: Unable to read file %s" % savefile)
         sys.exit(1)
 
-    if serverType == SERVER_XEN_API:
-        server.xenapi.VM.restore(savefile, paused)
-    else:
-        server.xend.domain.restore(savefile, paused)
+    try:
+        if serverType == SERVER_XEN_API:
+            server.xenapi.VM.restore(savefile, paused)
+        else:
+            server.xend.domain.restore(savefile, paused)
+    except Exception, ex:
+        err("%s" % ex.faultString)
 
 
 def datetime_to_secs(v):

_______________________________________________
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] [XEND/XM] Improve error reporting in 'xm restore'., Xen patchbot-unstable <=