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/
Home Products Support Community News


[Xen-changelog] [xen-3.2-testing] Fix save/restore failure cleanup

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] Fix save/restore failure cleanup
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 05 Feb 2008 11:11:08 -0800
Delivery-date: Tue, 05 Feb 2008 11:28:37 -0800
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.fraser@xxxxxxxxxx>
# Date 1202134521 0
# Node ID 5544d92614a9bcda6688274ddc0fca0724ebeb00
# Parent  623e5633f384c46f81972b756bc4a48dbf0f700c
Fix save/restore failure cleanup

The save failure cleanup introduced in 13543:207523704fb1 is
incorrect: if we didn't get as far as actually suspending the domain,
then the guest domain will not be expecting the devices to be removed
(seen on both Linux and Solaris, which don't expect a 'Closing' state
when they hold the device open). Only re-jig devices if we definitely
shut the domain down.

Signed-off-by: John Levon <john.levon@xxxxxxx>
xen-unstable changeset:   16964:5d84464dc1fc013110c25dc0ff1f99585e699fa3
xen-unstable date:        Sat Feb 02 10:51:54 2008 +0000
 tools/python/xen/xend/XendCheckpoint.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff -r 623e5633f384 -r 5544d92614a9 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Mon Feb 04 14:14:54 2008 +0000
+++ b/tools/python/xen/xend/XendCheckpoint.py   Mon Feb 04 14:15:21 2008 +0000
@@ -67,6 +67,8 @@ def save(fd, dominfo, network, live, dst
     # thing is useful for debugging.
     dominfo.setName('migrating-' + domain_name)
+    done_suspend = 0
         dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP1, domain_name)
@@ -94,6 +96,7 @@ def save(fd, dominfo, network, live, dst
                 log.debug("Suspending %d ...", dominfo.getDomid())
+                done_suspend = 1
                 dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
                 log.info("Domain %d suspended.", dominfo.getDomid())
@@ -140,9 +143,14 @@ def save(fd, dominfo, network, live, dst
         log.exception("Save failed on domain %s (%s).", domain_name,
-        dominfo.resumeDomain()
-        log.debug("XendCheckpoint.save: resumeDomain")
+        # If we didn't get as far as suspending the domain (for
+        # example, we couldn't balloon enough memory for the new
+        # domain), then we don't want to re-plumb the devices, as the
+        # domU will not be expecting it.
+        if done_suspend:
+            log.debug("XendCheckpoint.save: resumeDomain")
+            dominfo.resumeDomain()

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] Fix save/restore failure cleanup, Xen patchbot-3.2-testing <=