WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: Pass information to user when faili

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Pass information to user when failing migrate due to PCI dev.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 01 Jul 2007 18:31:14 -0700
Delivery-date: Sun, 01 Jul 2007 18:29:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Pass information to user when failing migrate due to PCI dev., Xen patchbot-unstable <=