john.levon@sun.com
2007-Apr-03 00:14 UTC
[Xen-devel] [PATCH] Fix "xm migrate" hang on failure
# HG changeset patch # User john.levon@sun.com # Date 1175559271 25200 # Node ID 2e38e4b6037fde219b0df642a2368f8f7b046c5b # Parent d8631258f6faf6825821baf9689186eb0c831f2a Fix "xm migrate" hang on failure. If a domain fails to restore, report back an error and close the connection. This still leaves a confusing error from ''xm migrate'' in many cases, but it''s much better than just sitting there. Signed-off-by: John Levon <john.levon@sun.com> diff --git a/tools/python/xen/xend/server/relocate.py b/tools/python/xen/xend/server/relocate.py --- a/tools/python/xen/xend/server/relocate.py +++ b/tools/python/xen/xend/server/relocate.py @@ -106,8 +106,12 @@ class RelocationProtocol(protocol.Protoc def op_receive(self, name, _): if self.transport: self.send_reply(["ready", name]) - XendDomain.instance().domain_restore_fd( - self.transport.sock.fileno()) + try: + XendDomain.instance().domain_restore_fd( + self.transport.sock.fileno()) + except: + self.send_error() + self.close() else: log.error(name + ": no transport") raise XendError(name + ": no transport") _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel