From 4f31fb7962a241c13251994c8659595fa2e0693e Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Fri, 11 Nov 2016 13:19:07 -0600 Subject: [PATCH] Set EVENTLET_NO_GREENDNS for IPv6 and dnspython compat If dnspython is present it causes socket.getaddrinfo() to be monkeypatched wiht code that does not work with IPv6. To get around this, the EVENTLET_NO_GREENDNS environment variable must be set before importing eventlet. This is resolved in the eventlet upstream code [1], but has not yet been released. Once our requirements have been raised past the 0.19.0 release with a version that includes this change we can remove this workaround. [1] https://github.com/eventlet/eventlet/commit/52b09becacd23f384cf69ae37d70c893c43e3b13 Change-Id: Id9fe265d67f6e9ea5090bebcacae4a7a9150c5c2 Closes-bug: #1471049 --- cinder/__init__.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cinder/__init__.py b/cinder/__init__.py index e69de29bb2d..b5f6222d56d 100644 --- a/cinder/__init__.py +++ b/cinder/__init__.py @@ -0,0 +1,21 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +"""Root Cinder module.""" + +import os + +# Ensure compatibility issues are covered with pythondsn +os.environ['EVENTLET_NO_GREENDNS'] = 'yes' + +# Make sure eventlet is loaded +import eventlet # noqa