Workaround for eventlet bug with unit tests in RHEL6.1.
This adds a patch to fix the broken eventlet code that's installed in the virtualenv. Fixes bug 884915 Change-Id: I6dbf755abbc5a52208de3dd892257ce39686d396
This commit is contained in:
parent
e42fe8565c
commit
9175822ffe
16
contrib/redhat-eventlet.patch
Normal file
16
contrib/redhat-eventlet.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- .nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py.orig
|
||||||
|
2011-05-25
|
||||||
|
23:31:34.597271402 +0000
|
||||||
|
+++ .nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py
|
||||||
|
2011-05-25
|
||||||
|
23:33:24.055602468 +0000
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
setattr(self, attr, wrapped_pipe)
|
||||||
|
__init__.__doc__ = subprocess_orig.Popen.__init__.__doc__
|
||||||
|
|
||||||
|
- def wait(self, check_interval=0.01):
|
||||||
|
+ def wait(self, check_interval=0.01, timeout=None):
|
||||||
|
# Instead of a blocking OS call, this version of wait() uses logic
|
||||||
|
# borrowed from the eventlet 0.2 processes.Process.wait() method.
|
||||||
|
try:
|
||||||
|
|
@ -90,6 +90,13 @@ class Distro(object):
|
|||||||
def install_m2crypto(self):
|
def install_m2crypto(self):
|
||||||
pip_install('M2Crypto')
|
pip_install('M2Crypto')
|
||||||
|
|
||||||
|
def post_process(self):
|
||||||
|
"""Any distribution-specific post-processing gets done here.
|
||||||
|
|
||||||
|
In particular, this is useful for applying patches to code inside
|
||||||
|
the venv."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Fedora(Distro):
|
class Fedora(Distro):
|
||||||
"""This covers all Fedora-based distributions.
|
"""This covers all Fedora-based distributions.
|
||||||
@ -120,6 +127,26 @@ class Fedora(Distro):
|
|||||||
if not self.check_pkg('m2crypto'):
|
if not self.check_pkg('m2crypto'):
|
||||||
self.yum_install('m2crypto')
|
self.yum_install('m2crypto')
|
||||||
|
|
||||||
|
def post_process(self):
|
||||||
|
"""Workaround for a bug in eventlet.
|
||||||
|
|
||||||
|
This currently affects RHEL6.1, but the fix can safely be
|
||||||
|
applied to all RHEL and Fedora distributions.
|
||||||
|
|
||||||
|
This can be removed when the fix is applied upstream
|
||||||
|
|
||||||
|
Nova: https://bugs.launchpad.net/nova/+bug/884915
|
||||||
|
Upstream: https://bitbucket.org/which_linden/eventlet/issue/89"""
|
||||||
|
|
||||||
|
# Install "patch" program if it's not there
|
||||||
|
if not self.check_pkg('patch'):
|
||||||
|
self.yum_install('patch')
|
||||||
|
|
||||||
|
# Apply the eventlet patch
|
||||||
|
run_command(['patch',
|
||||||
|
'.nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py',
|
||||||
|
'contrib/redhat-eventlet.patch'])
|
||||||
|
|
||||||
|
|
||||||
def get_distro():
|
def get_distro():
|
||||||
if os.path.exists('/etc/fedora-release') or \
|
if os.path.exists('/etc/fedora-release') or \
|
||||||
@ -177,6 +204,10 @@ def install_dependencies(venv=VENV):
|
|||||||
f.write("%s\n" % ROOT)
|
f.write("%s\n" % ROOT)
|
||||||
|
|
||||||
|
|
||||||
|
def post_process():
|
||||||
|
get_distro().post_process()
|
||||||
|
|
||||||
|
|
||||||
def print_help():
|
def print_help():
|
||||||
help = """
|
help = """
|
||||||
Nova development environment setup is complete.
|
Nova development environment setup is complete.
|
||||||
@ -214,6 +245,7 @@ def main(argv):
|
|||||||
check_dependencies()
|
check_dependencies()
|
||||||
create_virtualenv(no_site_packages=options.no_site_packages)
|
create_virtualenv(no_site_packages=options.no_site_packages)
|
||||||
install_dependencies()
|
install_dependencies()
|
||||||
|
post_process()
|
||||||
print_help()
|
print_help()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user