Skip to content

Commit edb8bcb

Browse files
committed
reenable greendns in nova.
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 (cherry picked from commit fe1ebe6) (cherry picked from commit a913ab1)
1 parent cb935a3 commit edb8bcb

File tree

3 files changed

+16
-58
lines changed

3 files changed

+16
-58
lines changed

nova/monkey_patch.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,11 @@
2222

2323

2424
def _monkey_patch():
25-
# See https://bugs.launchpad.net/nova/+bug/1164822
26-
# TODO(mdbooth): This feature was deprecated and removed in eventlet at
27-
# some point but brought back in version 0.21.0, presumably because some
28-
# users still required it to work round issues. However, there have been a
29-
# number of greendns fixes in eventlet since then. Specifically, it looks
30-
# as though the originally reported IPv6 issue may have been fixed in
31-
# version 0.24.0. We should remove this when we can confirm that the
32-
# original issue is fixed.
33-
# NOTE(artom) eventlet processes environment variables at import-time. We
34-
# therefore set this here, before importing eventlet, in order to correctly
35-
# disable greendns.
36-
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
37-
3825
# NOTE(mdbooth): Anything imported here will not be monkey patched. It is
3926
# important to take care not to import anything here which requires monkey
4027
# patching.
28+
# NOTE(artom) eventlet processes environment variables at import-time.
29+
# as such any eventlet configuration should happen here if needed.
4130
import eventlet
4231
import sys
4332

nova/tests/functional/test_monkey_patch.py

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
fixes:
3+
- |
4+
During the havana cycle it was discovered that eventlet
5+
monkey patching of greendns broke ipv6.
6+
https://bugs.launchpad.net/nova/+bug/1164822
7+
Since then nova has been disabling eventlet monkey patching
8+
of greendns. Eventlet adressed the ipv6 limitation in v0.17
9+
with the introduction of python 3 support in 2015. Nova
10+
however continued to disable it, which can result i slow dns
11+
queries blocking the entire nova api or other binary
12+
because socket.getaddrinfo becomes a blocking call into glibc
13+
see: https://bugs.launchpad.net/nova/+bug/1964149 for
14+
more details.

0 commit comments

Comments
 (0)