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] Continue to diagnose the device state, even if Xend has

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Continue to diagnose the device state, even if Xend has crashed.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Apr 2006 16:42:16 +0000
Delivery-date: Fri, 21 Apr 2006 09:47:21 -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 dbf7032f1fc69df0fb7529ee80f2f0766f78653a
# Parent  482c3d3cbc927be5b7abc660188c03d05409f68d
Continue to diagnose the device state, even if Xend has crashed.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 482c3d3cbc92 -r dbf7032f1fc6 tools/python/xen/util/diagnose.py
--- a/tools/python/xen/util/diagnose.py Thu Apr 20 17:09:53 2006 +0100
+++ b/tools/python/xen/util/diagnose.py Thu Apr 20 17:16:27 2006 +0100
@@ -11,10 +11,11 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
-# Copyright (c) 2005 XenSource Ltd
+# Copyright (c) 2005-2006 XenSource Inc
 
 
 import re
+import socket
 import sys
 
 from xen.xend import sxp
@@ -45,7 +46,6 @@ def diagnose(dom):
         state = sxp.child_value(domain, 'state')
         domid = int(sxp.child_value(domain, 'domid'))
         name = sxp.child_value(domain, 'name')
-        dompath = '/local/domain/%d' % domid
 
         print "Domain ID is %d." % domid
         print "Domain name is %s." % name
@@ -55,12 +55,23 @@ def diagnose(dom):
 
         if state.find('c') != -1:
             print "Domain has crashed."
+    except socket.error, exn:
+        print "Cannot contact Xend."
 
-        diagnose_console()
-
-        diagnose_devices()
+        try:
+            domid = int(dom)
+            name = dom
+        except ValueError:
+            print \
+"Without Xend, you will have to specify the domain ID, not the domain name."
+            sys.exit(1)
     except xen.xend.XendProtocol.XendError, exn:
         print exn
+        sys.exit(1)
+
+    dompath = '/local/domain/%d' % domid
+    diagnose_console()
+    diagnose_devices()
 
 
 def diagnose_console():

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Continue to diagnose the device state, even if Xend has crashed., Xen patchbot -unstable <=