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

[Xen-changelog] [xen-unstable] Diagnose a failing server, rather than just locking up the whole daemon.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 3629873ee1e607f8e803ba674c387e7850757269
# Parent  59f438d2739bd53162e81f3213b620b7212be892
Diagnose a failing server, rather than just locking up the whole daemon.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/SrvServer.py |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -r 59f438d2739b -r 3629873ee1e6 tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Mon Dec 04 13:37:53 2006 +0000
+++ b/tools/python/xen/xend/server/SrvServer.py Mon Dec 04 13:56:27 2006 +0000
@@ -111,6 +111,7 @@ class XendServers:
             # check for when all threads have initialized themselves and then
             # close the status pipe
 
+            retryCount = 0
             threads_left = True
             while threads_left:
                 threads_left = False
@@ -122,6 +123,14 @@ class XendServers:
 
                 if threads_left:
                     time.sleep(.5)
+                    retryCount += 1
+                    if retryCount > 60:
+                        for server in self.servers:
+                            if not server.ready:
+                                log.error("Server " +
+                                          server.__class__.__name__ +
+                                          " did not initialise!")
+                        break
 
             if status:
                 status.write('0')

_______________________________________________
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®.