ImportError: cannot import name greenpool
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 Debug: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: Sleeping for 5 seconds between tries Debug: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: Exec try 10/10 Debug: Exec[neutron-db-sync](provider=posix): Executing 'neutron-db-manage upgrade heads' Debug: Executing: 'neutron-db-manage upgrade heads' Debug: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: Sleeping for 5 seconds between tries Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: Traceback (most recent call last): Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/bin/neutron-db-manage", line 10, in <module> Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: sys.exit(main()) Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 657, in main Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: return_val |= bool(CONF.command.func(config, CONF.command.name <http://conf.command.name/>)) Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 179, in do_upgrade Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: run_sanity_checks(config, revision) Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 641, in run_sanity_checks Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: script_dir.run_env() Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 425, in run_env Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: util.load_python_file(self.dir, 'env.py') Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: module = load_module_py(module_id, path) Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 141, in load_module_py Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: mod = imp.load_source(module_id, path, fp) Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 24, in <module> Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: from neutron.db.migration.models import head # noqa Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/neutron/db/migration/models/head.py", line 28, in <module> Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: from neutron.common import utils Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 35, in <module> Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: import eventlet Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/eventlet/__init__.py", line 10, in <module> Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: from eventlet import convenience Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: File "/usr/lib/python2.7/site-packages/eventlet/convenience.py", line 4, in <module> 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 Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: Failed to call refresh: 'neutron-db-manage upgrade heads' returned 1 instead of one of [0] Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: 'neutron-db-manage upgrade heads' returned 1 instead of one of [0] Notice: /Stage[main]/Neutron::Deps/Anchor[neutron::dbsync::end]: Dependency Exec[neutron-db-sync] has failures: true -- <https://smart.salesforce.com/sig/peiyong.zhang//us_mb/default/link.html>
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
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
On Thu, Jun 17, 2021 at 10:44 AM Clark Boylan <cboylan@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>
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-...
On Thu, Jun 17, 2021 at 10:44 AM Clark Boylan <cboylan@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
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# On Thu, Jun 17, 2021 at 12:19 PM Clark Boylan <cboylan@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-...
On Thu, Jun 17, 2021 at 10:44 AM Clark Boylan <cboylan@sapwetik.org>
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
wrote: 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>
On Thu, Jun 17, 2021 at 9:08 PM Pete Zhang <peiyong.zhang@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@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-...
On Thu, Jun 17, 2021 at 10:44 AM Clark Boylan <cboylan@sapwetik.org>
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
wrote: 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>
participants (3)
-
Clark Boylan
-
Erno Kuvaja
-
Pete Zhang