Bug 217867 - [BUG] net/py-eventlet 0.20.1: AttributeError: 'module' object has no attribute 'EAI_NODATA'
Summary: [BUG] net/py-eventlet 0.20.1: AttributeError: 'module' object has no attribut...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Carlo Strub
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-17 13:38 UTC by Alexander Nusov
Modified: 2017-03-30 08:55 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (cs)


Attachments
proposed fix (3.22 KB, patch)
2017-03-17 14:00 UTC, Alexander Nusov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nusov 2017-03-17 13:38:56 UTC
The latest update of eventlet library has bug with exception handling.

> EAI_NODATA_ERROR = socket.gaierror(socket.EAI_NODATA, 'No address associated with hostname')

EAI_NODATA was deprected in 2003 in RFC3493
https://lists.freebsd.org/pipermail/freebsd-ports/2003-October/005757.html

Steps to reproduce
1. install net/py-eventlet
2. python -m eventlet

Log
root@express:~ # python2.7 -m eventlet
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/local/lib/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "/usr/local/lib/python2.7/site-packages/eventlet/__init__.py", line 10, in <module>
    from eventlet import convenience
  File "/usr/local/lib/python2.7/site-packages/eventlet/convenience.py", line 6, in <module>
    from eventlet.green import socket
  File "/usr/local/lib/python2.7/site-packages/eventlet/green/socket.py", line 28, in <module>
    from eventlet.support import greendns
  File "/usr/local/lib/python2.7/site-packages/eventlet/support/greendns.py", line 82, in <module>
    EAI_NODATA_ERROR = socket.gaierror(socket.EAI_NODATA, 'No address associated with hostname')
AttributeError: 'module' object has no attribute 'EAI_NODATA'
Comment 1 Alexander Nusov 2017-03-17 13:41:33 UTC
This change breaks all OpenStack services.

Upstream fix available here
https://github.com/eventlet/eventlet/commit/4e775e23f312c386929e0c5e9a9c952c1ec80c45
Comment 2 Alexander Nusov 2017-03-17 14:00:54 UTC
Created attachment 180903 [details]
proposed fix
Comment 3 Alexander Nusov 2017-03-22 12:59:19 UTC
can you rollback the commit?
Comment 4 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-29 19:34:54 UTC
(In reply to Alexander Nusov from comment #3)
Doesn't the attached patch fix the problem? (I assumed this because you requested roll-back of the commit)
Comment 5 Alexander Nusov 2017-03-29 20:01:17 UTC
Yes, it does.

Please fix it using the patch or rollback the commit.
thanks!
Comment 6 Carlo Strub freebsd_committer freebsd_triage 2017-03-29 21:08:09 UTC
Fixed. Thank you very much.
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-03-29 21:09:57 UTC
A commit references this bug:

Author: cs
Date: Wed Mar 29 21:07:55 UTC 2017
New revision: 437242
URL: https://svnweb.freebsd.org/changeset/ports/437242

Log:
  Fix attribute error

  PR:		217867
  Submitted by:	Alexander Nusov <alexander.nusov@nfvexpress.com>

Changes:
  head/net/py-eventlet/Makefile
  head/net/py-eventlet/files/
  head/net/py-eventlet/files/patch-eventlet_support_greendns.py
Comment 8 Mahdi Mokhtari freebsd_committer freebsd_triage 2017-03-30 08:55:46 UTC
(In reply to Carlo Strub from comment #6)
Thanks :)