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] Better diagnosis of the failure when Xend

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Better diagnosis of the failure when Xend crashes. Thanks to Hollis Blanchard
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 10:30:18 +0000
Delivery-date: Wed, 09 Aug 2006 03:32:58 -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 emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 58a04bfedf6be8065e10d2c36acbf03a4fb66062
# Parent  b3dd6ceda9bc931be8424a4cf2ca1ab4a42c53c1
Better diagnosis of the failure when Xend crashes.  Thanks to Hollis Blanchard
for diagnosis.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/util/xmlrpclib2.py |    5 +++++
 tools/python/xen/xm/create.py       |    2 +-
 tools/python/xen/xm/main.py         |   10 ++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff -r b3dd6ceda9bc -r 58a04bfedf6b tools/python/xen/util/xmlrpclib2.py
--- a/tools/python/xen/util/xmlrpclib2.py       Tue Aug 08 15:43:54 2006 +0100
+++ b/tools/python/xen/util/xmlrpclib2.py       Wed Aug 09 09:52:43 2006 +0100
@@ -138,6 +138,11 @@ class TCPXMLRPCServer(SocketServer.Threa
 
     def _marshaled_dispatch(self, data, dispatch_method = None):
         params, method = xmlrpclib.loads(data)
+        if False:
+            # Enable this block of code to exit immediately without sending
+            # a response.  This allows you to test client-side crash handling.
+            import sys
+            sys.exit(1)
         try:
             if dispatch_method is not None:
                 response = dispatch_method(method, params)
diff -r b3dd6ceda9bc -r 58a04bfedf6b tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Tue Aug 08 15:43:54 2006 +0100
+++ b/tools/python/xen/xm/create.py     Wed Aug 09 09:52:43 2006 +0100
@@ -972,7 +972,7 @@ def make_domain(opts, config):
         import signal
         if vncpid:
             os.kill(vncpid, signal.SIGKILL)
-        raise ex
+        raise
 
     dom = sxp.child_value(dominfo, 'name')
 
diff -r b3dd6ceda9bc -r 58a04bfedf6b tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Aug 08 15:43:54 2006 +0100
+++ b/tools/python/xen/xm/main.py       Wed Aug 09 09:52:43 2006 +0100
@@ -1257,6 +1257,16 @@ def main(argv=sys.argv):
             else:
                 print  >>sys.stderr, "Error: %s" % ex.faultString
             sys.exit(1)
+        except xmlrpclib.ProtocolError, ex:
+            if ex.errcode == -1:
+                print  >>sys.stderr, (
+                    "Xend has probably crashed!  Invalid or missing HTTP "
+                    "status code.")
+            else:
+                print  >>sys.stderr, (
+                    "Xend has probably crashed!  ProtocolError(%d, %s)." %
+                    (ex.errcode, ex.errmsg))
+            sys.exit(1)
         except (ValueError, OverflowError):
             err("Invalid argument.")
             usage(argv[1])

_______________________________________________
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] Better diagnosis of the failure when Xend crashes. Thanks to Hollis Blanchard, Xen patchbot-unstable <=