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

[Xen-changelog] [xen-unstable] Fix "xm migrate" hang on failure.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1175587431 -3600
# Node ID 4f67d849e788b3fe204b739bf1706e1424184823
# Parent  920f762ca42d615c34c603dc851b38e53330bdac
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>
---
 tools/python/xen/xend/server/relocate.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r 920f762ca42d -r 4f67d849e788 tools/python/xen/xend/server/relocate.py
--- a/tools/python/xen/xend/server/relocate.py  Tue Apr 03 09:03:03 2007 +0100
+++ b/tools/python/xen/xend/server/relocate.py  Tue Apr 03 09:03:51 2007 +0100
@@ -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-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®.