ImportError: cannot import name greenpool

Erno Kuvaja ekuvaja at redhat.com
Fri Jun 18 08:24:03 UTC 2021


On Thu, Jun 17, 2021 at 9:08 PM Pete Zhang <peiyong.zhang at salesforce.com>
wrote:

> From the [0], it appears dnspython is NOT installed properly.
> I installed python-dnspython (not sure if its the same as dnspython) and
> still don't see *dns* or "base" under
> /lib/python2.7/site-packages/dns/rdtypes/ANY as [0] mentioned.
>
> sh-4.2# pwd
>
> /lib/python2.7/site-packages/dns/rdtypes/ANY
>
> sh-4.2# ls -ail *dns*
>
> ls: cannot access *dns*: No such file or directory
>
> sh-4.2# ls -ail *base*
>
> ls: cannot access *base*: No such file or directory
>
> sh-4.2# ls -ail __init*
>
> 540159 -rw-r--r--. 1 root root 1169 Jun 13  2015 __init__.py
>
> 540248 -rw-r--r--. 2 root root  602 Aug  3  2017 __init__.pyc
>
> 540248 -rw-r--r--. 2 root root  602 Aug  3  2017 __init__.pyo
>
> sh-4.2# yum list | grep dnspython
>
> python-dnspython.noarch               1:1.10.0-1
> @ORB-extras
>
> sfdc-python27-dnspython.noarch        1.15.0-2019.10.311854.7.el7
> strata_sfdc-python
>
> sfdc-python35-dnspython.noarch        1.15.0-2019.04.081624.7.el7
> strata_sfdc-python
>
> sfdc-python36-dnspython.noarch        1.15.0-2021.05.122008.34.el7
>
> sh-4.2# yum list installed | grep dnspython
>
> python-dnspython.noarch           1:1.10.0-1               @ORB-extras
>
>
> sh-4.2#
>
> Hi Pete,

Out of curiosity, what version of Glance are you trying to run? Just
wanting to make sure this is not PY27/PY3 thing as I recall us having
issues with those dependencies at some point. So there might also be fixes
merged for those issues if it's an older release, but obviously recently we
have not supported PY27 anymore.

- jokke

>

On Thu, Jun 17, 2021 at 12:19 PM Clark Boylan <cboylan at sapwetik.org> wrote:
>
>> On Thu, Jun 17, 2021, at 11:58 AM, Pete Zhang wrote:
>> > Clark,
>> >
>> > I  adjusted the version of greenlet/eventlet as required by other
>> > modules. here is the output:
>> >
>> > ImportError: No module named dnskeybase
>> >
>> > sh-4.2# yum list installed | grep "greenlet\|eventlet\|gevent"
>> >
>> > python2-eventlet.noarch           0.25.1-1.el7
>>  @local_openstack-tnrp
>> >
>> > python2-gevent.x86_64             1.1.2-2.el7
>> @local_openstack-tnrp
>> >
>> > python2-greenlet.x86_64           0.4.12-1.el7
>>  @local_openstack-tnrp
>> >
>> > sh-4.2# python2
>> >
>> > Python 2.7.5 (default, Oct 30 2018, 23:45:53)
>> >
>> > [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
>> >
>> > Type "help", "copyright", "credits" or "license" for more information.
>> >
>> > >>> from eventlet import greenpool
>> >
>> > Traceback (most recent call last):
>> >
>> >   File "<stdin>", line 1, in <module>
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/__init__.py", line
>> > 10, in <module>
>> >
>> >     from eventlet import convenience
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/convenience.py", line
>> > 7, in <module>
>> >
>> >     from eventlet.green import socket
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/green/socket.py",
>> > line 21, in <module>
>> >
>> >     from eventlet.support import greendns
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/support/greendns.py",
>> > line 67, in <module>
>> >
>> >     setattr(dns.rdtypes, pkg, import_patched('dns.rdtypes.' + pkg))
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/support/greendns.py",
>> > line 59, in import_patched
>> >
>> >     return patcher.import_patched(module_name, **modules)
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/patcher.py", line
>> > 126, in import_patched
>> >
>> >     *additional_modules + tuple(kw_additional_modules.items()))
>> >
>> >   File "/usr/lib/python2.7/site-packages/eventlet/patcher.py", line
>> > 100, in inject
>> >
>> >     module = __import__(module_name, {}, {},
>> module_name.split('.')[:-1])
>> >
>> > ImportError: No module named dnskeybase
>> >
>> > >>>
>>
>> The internet indicates [0] this is a problem with your dnspython
>> installation. That post uses pip, but you are using distro packages so you
>> may need to map things a bit to do further debugging. Hopefully, that helps
>> get things sorted though.
>>
>> [0]
>> https://stackoverflow.com/questions/55152733/eventlet-importerror-no-module-named-dnskeybase
>>
>> >
>> >
>> > On Thu, Jun 17, 2021 at 10:44 AM Clark Boylan <cboylan at sapwetik.org>
>> wrote:
>> > > On Thu, Jun 17, 2021, at 10:03 AM, Pete Zhang wrote:
>> > > > Not sure if my previous email went through or not. Just resend it.
>> > > >
>> > > > We hit this error during "glance-manage db_sync":
>> > > > *ImportError: cannot import name greenpool.*
>> > > > Any idea what the root cause is and how to fix it?
>> > > > We have the following rpms installed (thought related).
>> > > >
>> > > > `python2-greenlet-0.4.9-1.el7.x86_64.rpm`
>> > > > `python2-eventlet-0.18.4-2.el7.noarch.rpm`
>> > > > `python2-gevent-1.1.2-2.el7.x86_64.rpm`
>> > > >
>> > > >
>> > >
>> > > snip
>> > >
>> > > > Notice:
>> /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns:
>> > > >   from eventlet import greenpool
>> > > >
>> > > > Notice:
>> /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns:
>> > > > ImportError: cannot import name greenpool
>> > >
>> > > I'm not familiar with the CentOS7 packaging, but as a sanity check I
>> ran `pip install greenlet==0.4.9 eventlet==0.18.4` in a python2 virtualenv
>> then in a python2 interpreter `from eventlet import greenpool` runs
>> successfully. I would try running this import by hand on your system to see
>> if you can get any more information. Could be a packaging issue or
>> potentially some sort of name collision between script names?
>> > >
>> > > Clark
>>
>
>
> --
>
> <https://smart.salesforce.com/sig/peiyong.zhang//us_mb/default/link.html>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210618/e3dd1dcb/attachment.html>


More information about the openstack-discuss mailing list