summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Pilotti <ap@pilotti.it>2012-11-03 20:54:12 +0200
committerAlessandro Pilotti <ap@pilotti.it>2012-11-05 17:12:24 +0200
commitbcf8af965e0fc487d27b703e1bbefee4ab433d18 (patch)
treee5b3f1cedfdb874f484a3f7ca3e5e0bcda73f298
parentdd086638b8c6e43f275fc45b3fc7df2de90bb2c2 (diff)
downloadnova-bcf8af965e0fc487d27b703e1bbefee4ab433d18.tar.gz
nova-bcf8af965e0fc487d27b703e1bbefee4ab433d18.tar.xz
nova-bcf8af965e0fc487d27b703e1bbefee4ab433d18.zip
Fixes volume attach issue on Hyper-V
Fixes Bug: #1074717 During volume attach on Windows a process is spawned. The process currently fails with the following exception, due to eventlet monkey patching of the os module. NotImplementedError: set_nonblocking() on a file object with no setblocking() method (Windows pipes don't support non-blocking I/O) The fix consists in avoiding monkey patching the os module in nova-compute on Hyper-V Change-Id: Ib513bc218da83b751439bad114baac24b08e3d02
-rwxr-xr-xbin/nova-compute9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/nova-compute b/bin/nova-compute
index 2a2a0013a..a926aa074 100755
--- a/bin/nova-compute
+++ b/bin/nova-compute
@@ -20,7 +20,14 @@
"""Starter script for Nova Compute."""
import eventlet
-eventlet.monkey_patch()
+import os
+
+if os.name == 'nt':
+ # eventlet monkey patching causes subprocess.Popen to fail on Windows
+ # when using pipes due to missing non blocking I/O support
+ eventlet.monkey_patch(os=False)
+else:
+ eventlet.monkey_patch()
import os
import sys