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

[Xen-changelog] [xen-unstable] xend: Pass information to user when failing migrate due to PCI dev.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1183324238 -3600
# Node ID 713bac7cba462407d131f41b7356e3213dccb74b
# Parent  2cdf8fef8d93311e38f1bbe928b05ddc4ee954d9
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@xxxxxxxxxxxx>
---
 tools/python/xen/xend/XendCheckpoint.py |    2 ++
 tools/python/xen/xend/XendDomain.py     |    4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff -r 2cdf8fef8d93 -r 713bac7cba46 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Sun Jul 01 22:10:13 2007 +0100
+++ b/tools/python/xen/xend/XendCheckpoint.py   Sun Jul 01 22:10:38 2007 +0100
@@ -148,6 +148,8 @@ def save(fd, dominfo, network, live, dst
         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 -r 2cdf8fef8d93 -r 713bac7cba46 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Sun Jul 01 22:10:13 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Sun Jul 01 22:10:38 2007 +0100
@@ -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]))

_______________________________________________
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®.