Skip to contentSkip to conversation

fix a ssl migration hang issue

PATCH New Zhigang Wang 1 participant 1 message Jan 9, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix a ssl migration hang issue

hi,

this patch fixes a ssl migration hang issue: when another VM started by xend, the spawned qemu process will keep the p2cwrite file descriptor open. Thus there will be two open descriptors associated with the write end of the pipe. Then when read end of the pipe only reach the EOF when the qemu process has terminated.

thanks,

zhigang

tools/python/xen/xend/server/relocate.py +2 -0
diff -Nurap xen-unstable.orig/tools/python/xen/xend/server/relocate.py xen-unstable/tools/python/xen/xend/server/relocate.py
@@ -122,6 +122,8 @@ class RelocationProtocol(protocol.Protoc
         if self.transport:
             self.send_reply(["ready", name])
             p2cread, p2cwrite = os.pipe()
+            from xen.util import oshelp
+            oshelp.fcntl_setfd_cloexec(p2cwrite, True)
             threading.Thread(target=connection.SSLSocketServerConnection.recv2fd,
                              args=(self.transport.sock, p2cwrite)).start()
             try:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel