Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS is broken with eventlet==0.20.0 #363

Closed
mattbennett opened this issue Dec 20, 2016 · 4 comments
Closed

DNS is broken with eventlet==0.20.0 #363

mattbennett opened this issue Dec 20, 2016 · 4 comments

Comments

@mattbennett
Copy link
Contributor

mattbennett commented Dec 20, 2016

Upgrading to eventlet 0.20.0 breaks DNS lookups of fully-qualified domain names that do not end with a . if a search domain is specified.

dnspython doesn't support this behaviour (rthalley/dnspython#219), I guess because it's not strictly correct, but socket.getaddrinfo does, so the behaviour is different with and without the monkeypatch.

Gist to reproduce is here: https://gist.github.com/mattbennett/b0340fedd8a8f1fecd47cba26c7bec6b

@temoto temoto self-assigned this Dec 21, 2016
@temoto temoto added this to the v0.21 milestone Dec 21, 2016
@temoto temoto changed the title DNS is broken with eventlet==0.2.0 DNS is broken with eventlet==0.20.0 Dec 22, 2016
temoto added a commit that referenced this issue Dec 22, 2016
`resolv.conf` docs say unqualified names must resolve from search (or local) domain.
However, common OS `getaddrinfo()` implementations append trailing dot (e.g. `db -> db.`)
and ask nameservers, as if top-level domain was queried.
Eventlet now supports this behavior.
#363
@temoto
Copy link
Member

temoto commented Dec 22, 2016

Please try this version with fix

pip install https://github.com/eventlet/eventlet/archive/2dabaecdc1c582f2db43f114b10af461430deced.zip

temoto added a commit that referenced this issue Dec 22, 2016
`resolv.conf` docs say unqualified names must resolve from search (or local) domain.
However, common OS `getaddrinfo()` implementations append trailing dot (e.g. `db -> db.`)
and ask nameservers, as if top-level domain was queried.
Eventlet now supports this behavior.
#363
@mattbennett
Copy link
Contributor Author

Yep, this solves the problem. Thank you.

I guess the resolve.conf docs are vague -- "Resolver queries having fewer than ndots dots in them will be attempted using each component of the search path..." but if ndots is zero then shouldn't a no-dot domain name be interpreted as fully-qualified? getaddrinfo seems to be interpreting it one way and dnspython the other.

temoto added a commit that referenced this issue Dec 22, 2016
`resolv.conf` docs say unqualified names must resolve from search (or local) domain.
However, common OS `getaddrinfo()` implementations append trailing dot (e.g. `db -> db.`)
and ask nameservers, as if top-level domain was queried.
Eventlet now supports this behavior.
#363
@temoto
Copy link
Member

temoto commented Dec 22, 2016

I deeply agree that resolv.conf specs could use some tough clarification. I think ndots:0 makes unqualified names invalid. Also, from managing persistent virtual machines I learned that adding .local domain everywhere makes things really clear and easy to configure.

@temoto temoto modified the milestones: v0.20, v0.21 Dec 23, 2016
@temoto
Copy link
Member

temoto commented Jan 3, 2017

The fix is included in v0.20.1 version that is already available on PyPI.
If you pinned requirements to 0.19, please update to eventlet==0.20.1 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants