ia64/xen-unstable

changeset 14703:4f67d849e788

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>
author kfraser@localhost.localdomain
date Tue Apr 03 09:03:51 2007 +0100 (2007-04-03)
parents 920f762ca42d
children 45e9f6d7e422
files tools/python/xen/xend/server/relocate.py
line diff
     1.1 --- a/tools/python/xen/xend/server/relocate.py	Tue Apr 03 09:03:03 2007 +0100
     1.2 +++ b/tools/python/xen/xend/server/relocate.py	Tue Apr 03 09:03:51 2007 +0100
     1.3 @@ -106,8 +106,12 @@ class RelocationProtocol(protocol.Protoc
     1.4      def op_receive(self, name, _):
     1.5          if self.transport:
     1.6              self.send_reply(["ready", name])
     1.7 -            XendDomain.instance().domain_restore_fd(
     1.8 -                self.transport.sock.fileno())
     1.9 +            try:
    1.10 +                XendDomain.instance().domain_restore_fd(
    1.11 +                    self.transport.sock.fileno())
    1.12 +            except:
    1.13 +                self.send_error()
    1.14 +                self.close()
    1.15          else:
    1.16              log.error(name + ": no transport")
    1.17              raise XendError(name + ": no transport")