ia64/xen-unstable

changeset 12787:3629873ee1e6

Diagnose a failing server, rather than just locking up the whole daemon.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Dec 04 13:56:27 2006 +0000 (2006-12-04)
parents 59f438d2739b
children 565cd8f32c70
files tools/python/xen/xend/server/SrvServer.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvServer.py	Mon Dec 04 13:37:53 2006 +0000
     1.2 +++ b/tools/python/xen/xend/server/SrvServer.py	Mon Dec 04 13:56:27 2006 +0000
     1.3 @@ -111,6 +111,7 @@ class XendServers:
     1.4              # check for when all threads have initialized themselves and then
     1.5              # close the status pipe
     1.6  
     1.7 +            retryCount = 0
     1.8              threads_left = True
     1.9              while threads_left:
    1.10                  threads_left = False
    1.11 @@ -122,6 +123,14 @@ class XendServers:
    1.12  
    1.13                  if threads_left:
    1.14                      time.sleep(.5)
    1.15 +                    retryCount += 1
    1.16 +                    if retryCount > 60:
    1.17 +                        for server in self.servers:
    1.18 +                            if not server.ready:
    1.19 +                                log.error("Server " +
    1.20 +                                          server.__class__.__name__ +
    1.21 +                                          " did not initialise!")
    1.22 +                        break
    1.23  
    1.24              if status:
    1.25                  status.write('0')