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-devel

[Xen-devel] closed each side of the socket when cross migration

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] closed each side of the socket when cross migration
From: "James Song" <jsong@xxxxxxxxxx>
Date: Thu, 02 Jul 2009 03:34:35 -0600
Delivery-date: Thu, 02 Jul 2009 02:35:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
when migrate simultaneously on two host, the first migrate will not complete for socket refuse to be closed for unfinished  read/write operator. So below patch will fix this bug:
Signed-off-by: James Song(Song Wei) <jsong@xxxxxxxxxx>
 
--- a/tools/python/xen/xend/XendDomain.py
+++ b/tools/python/xen/xend/XendDomain.py
@@ -1361,7 +1361,7 @@ class XendDomain:
                 XendCheckpoint.save(sock.fileno(), dominfo, True, live,
                                     dst, node=node)
             finally:
-                sock.close()
+                sock.shutdown(SHUT_RDWR)
 
     def domain_save(self, domid, dst, checkpoint=False, force=False):
         """Start saving a domain to file.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] closed each side of the socket when cross migration, James Song <=