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

Bug #1785615 reported by Daniel Alvarez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Undecided
Unassigned

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

Revision history for this message
Miguel Lavalle (minsel) wrote :

Is the action item for Neutron to make sure we use eventlet with the merged fix?

Revision history for this message
Daniel Alvarez (dalvarezs) wrote :

@Miguel yes. I requested a tag for eventlet and 0.24.1 contains the fix. I'll send a patch to test it out.
Thanks!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/589385

s10 (vlad-esten)
Changed in neutron:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Slawek Kaplonski (<email address hidden>) on branch: master
Review: https://review.openstack.org/589385
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements rocky-eol

This issue was fixed in the openstack/requirements rocky-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.