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:
Lorin Hochstein
2011年11月09日 14:00:55 -05:00
parent e42fe8565c
commit 9175822ffe

View 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:

View File

@@ -90,6 +90,13 @@ class Distro(object):
def install_m2crypto(self):
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):
"""This covers all Fedora-based distributions.
@@ -120,6 +127,26 @@ class Fedora(Distro):
if not self.check_pkg('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():
if os.path.exists('/etc/fedora-release') or \
@@ -177,6 +204,10 @@ def install_dependencies(venv=VENV):
f.write("%s\n" % ROOT)
def post_process():
get_distro().post_process()
def print_help():
help = """
Nova development environment setup is complete.
@@ -214,6 +245,7 @@ def main(argv):
check_dependencies()
create_virtualenv(no_site_packages=options.no_site_packages)
install_dependencies()
post_process()
print_help()
if __name__ == '__main__':
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.