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

[Xen-devel] [PATCH] Fix "xm migrate" hang on failure



# HG changeset patch
# User john.levon@xxxxxxx
# 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@xxxxxxx>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.