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

[Xen-changelog] Fix migrate.



# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID dab434c9349c96f8eaaef146716bd04231fa1967
# Parent  c55ac1858bbce73be3be7ee436765cf25d33bdbf
Fix migrate. 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r c55ac1858bbc -r dab434c9349c tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Thu Dec  1 10:27:27 2005
+++ b/tools/python/xen/xend/XendCheckpoint.py   Thu Dec  1 11:27:29 2005
@@ -40,10 +40,18 @@
         raise XendError(errmsg)
 
 def read_exact(fd, size, errmsg):
-    buf = os.read(fd, size)
-    if len(buf) != size:
-        raise XendError(errmsg)
+    buf  = '' 
+    while size != 0: 
+        str = os.read(fd, size)
+        if not len(str):
+            log.error("read_exact: EOF trying to read %d (buf='%s')" % \
+                      (size, buf))
+            raise XendError(errmsg)
+        size = size - len(str)
+        buf  = buf + str
     return buf
+
+
 
 def save(fd, dominfo, live):
     write_exact(fd, SIGNATURE, "could not write guest state file: signature")
diff -r c55ac1858bbc -r dab434c9349c tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Dec  1 10:27:27 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Dec  1 11:27:29 2005
@@ -397,6 +397,7 @@
             raise XendError("can't connect: %s" % err[1])
 
         sock.send("receive\n")
+        sock.recv(80) 
         XendCheckpoint.save(sock.fileno(), dominfo, live)
 
 

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