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:
kfraser@localhost.localdomain committed 2007-04-03 09:03:51 +01:00
1 parent ebecb5a9d3
commit 9bea671737
1 file changed
+6 -2
+6 -2
View File
@@ -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")
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.