]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Tell gevent not to patch os.waitpid() 1020/head
authorZack Cerza <zack@redhat.com>
Wed, 25 Jan 2017 21:08:35 +0000 (14:08 -0700)
committerZack Cerza <zack@redhat.com>
Wed, 25 Jan 2017 21:08:35 +0000 (14:08 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/__init__.py

index b240186b6f20d57741b11e796c83ac1fbb94bc4d..b7347612be73f817e62c50e39d3a6e1d6b7ad788 100644 (file)
@@ -1,3 +1,9 @@
+import os
+# Tell gevent not to patch os.waitpid() since it is susceptible to race
+# conditions. See:
+# http://www.gevent.org/gevent.monkey.html#gevent.monkey.patch_os
+os.environ['GEVENT_NOWAITPID'] = 'true'
+
 # Use manhole to give us a way to debug hung processes
 # https://pypi.python.org/pypi/manhole
 import manhole
@@ -21,7 +27,6 @@ from .orchestra import monkey
 monkey.patch_all()
 
 import logging
-import os
 import subprocess
 
 __version__ = '1.0.0'