Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Havana
openstack-cinder
0001-Avoid-using-GREENDNS-due-to-dnspython.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Avoid-using-GREENDNS-due-to-dnspython.patch of Package openstack-cinder
From 4a73fecb380a4ef18acfe3eb020cf0be34c7c586 Mon Sep 17 00:00:00 2001 From: Dirk Mueller <dirk@dmllr.de> Date: Sun, 23 Jun 2013 13:28:24 +0200 Subject: [PATCH] Avoid using GREENDNS due to dnspython If dnspython is present in your environment then eventlet monkeypatches socket.getaddrinfo() with an implementation which doesn't work for IPv6. To turn this off you need to set an environment variable before you do the import. Resolves bug 1164822 Change-Id: I4aa3d40d0f8d0f125c3a89c4ba062ad0d13f1c55 --- cinder/tests/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cinder/tests/__init__.py b/cinder/tests/__init__.py index cb73bd3..36cb11d 100644 --- a/cinder/tests/__init__.py +++ b/cinder/tests/__init__.py @@ -30,6 +30,21 @@ .. moduleauthor:: Andy Smith <andy@anarkystic.com> """ +import os +import sys + +# NOTE(mikal): All of this is because if dnspython is present in your +# environment then eventlet monkeypatches socket.getaddrinfo() with an +# implementation which doesn't work for IPv6. What we're checking here is +# that the magic environment variable was set when the import happened. +if ('eventlet' in sys.modules and + os.environ.get('EVENTLET_NO_GREENDNS', '').lower() != 'yes'): + raise ImportError('eventlet imported before nova/cmd/__init__ ' + '(env var set to %s)' + % os.environ.get('EVENTLET_NO_GREENDNS')) + +os.environ['EVENTLET_NO_GREENDNS'] = 'yes' + import eventlet eventlet.monkey_patch() -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor