summaryrefslogtreecommitdiffstats
path: root/update.py
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2013-05-02 09:44:30 +0100
committerMark McLoughlin <markmc@redhat.com>2013-05-08 06:48:20 +0100
commit3c132c028a089936eb205079ad239347bc1a0dd9 (patch)
tree4e499d3eeef0c581c37f9f214c77a8cf0ce9afdb /update.py
parentf9d502228752bcb909e58cafacd1cd948d9a8206 (diff)
downloadoslo-3c132c028a089936eb205079ad239347bc1a0dd9.tar.gz
oslo-3c132c028a089936eb205079ad239347bc1a0dd9.tar.xz
oslo-3c132c028a089936eb205079ad239347bc1a0dd9.zip
Copy Nova's workaround for RHEL6 eventlet issue
The eventlet on PyPI basically doesn't work on RHEL because we (Red Hat) screwed up by not taking monkey patching into account when backporting an API from python 3. This is the series of events: 1) We backported a patch to RHEL6 from Python 3 which added an optional 'timeout' argument to subprocess.Popen: http://pkgs.devel.redhat.com/cgit/rpms/python/commit/?h=rhel-6.3&id=fc9a3f0e07 This might sound innocuous but it means the wait() function get called with a timeout argument 2) eventlet overrides this function, but doesn't know about the timeout argument, so it fails. To reproduce, try applying this to your python 2.7: https://gist.github.com/markmc/5500967 3) eventlet doesn't yet support Python 3, so the only time this issue crops up is if you use eventlet on RHEL6 4) We've fixed eventlet in EPEL6, but the issue still remains if you install eventlet from upstream 5) Dave Malcolm sent a pull request to eventlet, but it has stalled: https://bitbucket.org/eventlet/eventlet/pull-request/30/add-dummy-timeout-parameter-to Nova has long had a nasty workaround to patch eventlet in our virtualenv and we now need this workaround in oslo-incubator to test processutils. Let's add it here and make nova sync it from oslo-incubator. I really hope we can get eventlet upstream "fixed" and the fix released soon. When that happens, we can kill all this nastiness. Change-Id: I62ce43a330d7ae94eda4c7498782a655e63747fa
Diffstat (limited to 'update.py')
-rw-r--r--update.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/update.py b/update.py
index f6ffd7c..36ee3f2 100644
--- a/update.py
+++ b/update.py
@@ -173,8 +173,7 @@ def _copy_pyfile(path, base, dest_dir):
def _copy_module(mod, base, dest_dir):
- print(("Copying openstack.common.%s under the %s module in %s" %
- (mod, base, dest_dir)))
+ print("Copying %s under the %s module in %s" % (mod, base, dest_dir))
copy_pyfile = functools.partial(_copy_pyfile,
base=base, dest_dir=dest_dir)
@@ -183,7 +182,8 @@ def _copy_module(mod, base, dest_dir):
path = _mod_to_path('openstack.common')
for d in mod.split('.')[:-1]:
path = os.path.join(path, d)
- copy_pyfile(os.path.join(path, '__init__.py'))
+ if os.path.isdir(path):
+ copy_pyfile(os.path.join(path, '__init__.py'))
mod_path = _mod_to_path('openstack.common.%s' % mod)
mod_file = '%s.py' % mod_path
@@ -200,6 +200,7 @@ def _copy_module(mod, base, dest_dir):
globs_to_copy = [
os.path.join('tools', mod + '*'),
os.path.join('etc', 'oslo', mod + '*.conf'),
+ os.path.join('contrib', mod + '*'),
]
for matches in [glob.glob(g) for g in globs_to_copy]: