← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1785615] [NEW] DNS resolution through eventlet contact nameservers if there's an IPv4 or IPv6 entry present in hosts file

 

Public bug reported:

When trying to resolve a hostname on a node with no nameservers
configured and only one entry is present for it in /etc/hosts (IPv4 or
IPv6), eventlet will try to fetch the other entry over the network.

This changes the behavior from what the original getaddrinfo()
implementation does and causes 30 second delays and often timeouts when,
for example, metadata agent tries to contact Nova [0].

Here it's a simple reproducer which shows the behavior when we do the
monkey patching:

import eventlet
import socket
import time

print socket.getaddrinfo('overcloud.internalapi.localdomain', 80, 0, socket.SOCK_STREAM)
print time.time()
eventlet.monkey_patch()
print socket.getaddrinfo('overcloud.internalapi.localdomain', 80, 0, socket.SOCK_STREAM)
print time.time()


Eventlet issue reported here [1] and fix got merged in master branch.

[0] https://github.com/openstack/neutron/blob/13.0.0.0b3/neutron/agent/metadata/agent.py#L189
[1] https://github.com/eventlet/eventlet/issues/511

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1785615

Title:
  DNS resolution through eventlet contact nameservers if there's an IPv4
  or IPv6 entry present in hosts file

Status in neutron:
  New

Bug description:
  When trying to resolve a hostname on a node with no nameservers
  configured and only one entry is present for it in /etc/hosts (IPv4 or
  IPv6), eventlet will try to fetch the other entry over the network.

  This changes the behavior from what the original getaddrinfo()
  implementation does and causes 30 second delays and often timeouts
  when, for example, metadata agent tries to contact Nova [0].

  Here it's a simple reproducer which shows the behavior when we do the
  monkey patching:

  import eventlet
  import socket
  import time

  print socket.getaddrinfo('overcloud.internalapi.localdomain', 80, 0, socket.SOCK_STREAM)
  print time.time()
  eventlet.monkey_patch()
  print socket.getaddrinfo('overcloud.internalapi.localdomain', 80, 0, socket.SOCK_STREAM)
  print time.time()

  
  Eventlet issue reported here [1] and fix got merged in master branch.

  [0] https://github.com/openstack/neutron/blob/13.0.0.0b3/neutron/agent/metadata/agent.py#L189
  [1] https://github.com/eventlet/eventlet/issues/511

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1785615/+subscriptions