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

[Xen-changelog] [xen-unstable] Don't bail if the VM renaming at the end of saving doesn't succeed -- we



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 7a5246955bef179fb199329b4646b3eb74489735
# Parent  ee70bf177981280e5363ec8cd583c8a6223663f8
Don't bail if the VM renaming at the end of saving doesn't succeed -- we
expect a failure if this is a localhost migration.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendCheckpoint.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -r ee70bf177981 -r 7a5246955bef tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Tue Nov 28 11:31:46 2006 +0000
+++ b/tools/python/xen/xend/XendCheckpoint.py   Tue Nov 28 11:35:10 2006 +0000
@@ -36,6 +36,7 @@ def write_exact(fd, buf, errmsg):
 def write_exact(fd, buf, errmsg):
     if os.write(fd, buf) != len(buf):
         raise XendError(errmsg)
+
 
 def read_exact(fd, size, errmsg):
     buf  = '' 
@@ -48,7 +49,6 @@ def read_exact(fd, size, errmsg):
         size = size - len(readstr)
         buf  = buf + readstr
     return buf
-
 
 
 def save(fd, dominfo, network, live, dst):
@@ -97,7 +97,14 @@ def save(fd, dominfo, network, live, dst
         forkHelper(cmd, fd, saveInputHandler, False)
 
         dominfo.destroyDomain()
-        dominfo.setName(domain_name)
+        try:
+            dominfo.setName(domain_name)
+        except VmError:
+            # Ignore this.  The name conflict (hopefully) arises because we
+            # are doing localhost migration; if we are doing a suspend of a
+            # persistent VM, we need the rename, and don't expect the
+            # conflict.  This needs more thought.
+            pass
 
     except Exception, exn:
         log.exception("Save failed on domain %s (%s).", domain_name,

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