mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
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>
This commit is contained in:
1 parent
ebecb5a9d3
commit
9bea671737
1 file changed
+6
-2
@@ -106,8 +106,12 @@ class RelocationProtocol(protocol.Protocol):
|
||||
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")
|
||||
|
||||