[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND/XM] Improve error reporting in 'xm restore'.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.