Better diagnosis of the failure when Xend crashes. Thanks to Hollis Blanchard

for diagnosis.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2006-08-09 09:52:43 +01:00
1 parent a3a905683d
commit 03b3d1627f
3 files changed
+16 -1

No files matched your search

+5
View File
@@ -138,6 +138,11 @@ class TCPXMLRPCServer(SocketServer.ThreadingMixIn, SimpleXMLRPCServer):
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)
+1 -1
View File
@@ -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')
+10
View File
@@ -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])
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.