Skip to content

Commit

Permalink
reenable greendns in nova.
Browse files Browse the repository at this point in the history
Back in the days of centos 6 and python 2.6 eventlet
greendns monkeypatching broke ipv6. As a result nova
has run without greendns monkey patching ever since.
This removes that old workaround allowing modern
eventlet to use greendns for non blocking dns lookups.

Closes-Bug: #1964149
Change-Id: Ia511879d2f5f50a3f63d180258abccf046a7264e
  • Loading branch information
SeanMooney committed Mar 8, 2022
1 parent 22a47b4 commit fe1ebe6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 58 deletions.
15 changes: 2 additions & 13 deletions nova/monkey_patch.py
Expand Up @@ -22,22 +22,11 @@


def _monkey_patch():
# See https://bugs.launchpad.net/nova/+bug/1164822
# TODO(mdbooth): This feature was deprecated and removed in eventlet at
# some point but brought back in version 0.21.0, presumably because some
# users still required it to work round issues. However, there have been a
# number of greendns fixes in eventlet since then. Specifically, it looks
# as though the originally reported IPv6 issue may have been fixed in
# version 0.24.0. We should remove this when we can confirm that the
# original issue is fixed.
# NOTE(artom) eventlet processes environment variables at import-time. We
# therefore set this here, before importing eventlet, in order to correctly
# disable greendns.
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'

# NOTE(mdbooth): Anything imported here will not be monkey patched. It is
# important to take care not to import anything here which requires monkey
# patching.
# NOTE(artom) eventlet processes environment variables at import-time.
# as such any eventlet configuration should happen here if needed.
import eventlet
import sys

Expand Down
45 changes: 0 additions & 45 deletions nova/tests/functional/test_monkey_patch.py

This file was deleted.

14 changes: 14 additions & 0 deletions releasenotes/notes/greendns-34df7f9fba952bcd.yaml
@@ -0,0 +1,14 @@
---
fixes:
- |
During the havana cycle it was discovered that eventlet
monkey patching of greendns broke ipv6.
https://bugs.launchpad.net/nova/+bug/1164822
Since then nova has been disabling eventlet monkey patching
of greendns. Eventlet adressed the ipv6 limitation in v0.17
with the introduction of python 3 support in 2015. Nova
however continued to disable it, which can result i slow dns
queries blocking the entire nova api or other binary
because socket.getaddrinfo becomes a blocking call into glibc
see: https://bugs.launchpad.net/nova/+bug/1964149 for
more details.

0 comments on commit fe1ebe6

Please sign in to comment.