Eventlet+DNSPython breaks /etc/hosts resolution

Eventlet's GreenDNS Patching will prevent the resolution of names in
the /etc/hosts file, causing problems for for installs. By forcing
the EVENTLET_NO_GREENDNS=yes environment variable, we tell eventlet
not to patch the stdlib's DNS functions with dnspython.

Change-Id: I08b91c598f2904fe8d82827a35b187ae8a4d5d0d
This commit is contained in:
Kiall Mac Innes 2015-06-13 10:49:01 +01:00
parent 29adef5e12
commit 7861480134
1 changed files with 6 additions and 1 deletions

View File

@ -13,11 +13,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import os
# Eventlet's GreenDNS Patching will prevent the resolution of names in
# the /etc/hosts file, causing problems for for installs.
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
import eventlet
eventlet.monkey_patch()
import os
import socket
from oslo_config import cfg