aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-07-01 22:10:38 +0100
committerKeir Fraser <keir@xensource.com>2007-07-01 22:10:38 +0100
commitc32cff27bab6b78df0ea846bc7ddae3090f3d88a (patch)
tree1f06914e5e7cb5c9e0a390bd0956683ca82c1857 /tools
parent450f5b5b9e64c3afccc49fdec6af5b768cedaded (diff)
downloadxen-c32cff27bab6b78df0ea846bc7ddae3090f3d88a.tar.gz
xen-c32cff27bab6b78df0ea846bc7ddae3090f3d88a.tar.bz2
xen-c32cff27bab6b78df0ea846bc7ddae3090f3d88a.zip
xend: Pass information to user when failing migrate due to PCI dev.
When failing a migration / save due to the domain owning a PCI device make sure that we tell the user what went wrong! Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xend/XendCheckpoint.py2
-rw-r--r--tools/python/xen/xend/XendDomain.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py
index 2cfc06a2db..1aa7d7f69d 100644
--- a/tools/python/xen/xend/XendCheckpoint.py
+++ b/tools/python/xen/xend/XendCheckpoint.py
@@ -148,6 +148,8 @@ def save(fd, dominfo, network, live, dst, checkpoint=False):
except:
log.exception("Failed to reset the migrating domain's name")
+ raise exn
+
def restore(xd, fd, dominfo = None, paused = False):
signature = read_exact(fd, len(SIGNATURE),
diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py
index 4d082a5ac9..bca5830185 100644
--- a/tools/python/xen/xend/XendDomain.py
+++ b/tools/python/xen/xend/XendDomain.py
@@ -1262,8 +1262,10 @@ class XendDomain:
try:
XendCheckpoint.save(fd, dominfo, False, False, dst,
checkpoint=checkpoint)
- finally:
+ except Exception, e:
os.close(fd)
+ raise e
+ os.close(fd)
except OSError, ex:
raise XendError("can't write guest state file %s: %s" %
(dst, ex[1]))