Currently nova.utils.tpool_execute() only works by chance. And as the
bug report shows there are env where it fails.
The nova.utils.tpool_execute() call tries to uses eventlet.tpool.execute
but the tpool module is not imported by the utils module only eventlet.
In devstack it works by chance as the wsgi init actually imports
eventlet.tpool indirectly via:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/stack/nova/nova/api/openstack/compute/__init__.py", line 21, in <module>
from nova.api.openstack.compute.routes import APIRouterV21 # noqa
File "/opt/stack/nova/nova/api/openstack/compute/routes.py", line 20, in <module>
from nova.api.openstack.compute import admin_actions
File "/opt/stack/nova/nova/api/openstack/compute/admin_actions.py", line 17, in <module>
from nova.api.openstack import common
File "/opt/stack/nova/nova/api/openstack/common.py", line 27, in <module>
from nova.compute import task_states
File "/opt/stack/nova/nova/compute/task_states.py", line 26, in <module>
from nova.objects import fields
File "/opt/stack/nova/nova/objects/fields.py", line 24, in <module>
from nova.network import model as network_model
File "/opt/stack/nova/nova/network/model.py", line 23, in <module>
from nova import utils
File "/opt/stack/nova/nova/utils.py", line 39, in <module>
from oslo_concurrency import processutils
File "/usr/local/lib/python3.8/dist-packages/oslo_concurrency/processutils.py", line 57, in <module>
from eventlet import tpool
This was broken since I8dbc579e0037969aab4f2bb500fccfbde4190726. This
patch adds the correct import statement.
Change-Id: Ic46345ceeb445164aea6ae9b35c457c6150765f6
Closes-Bug: #1915400
(cherry picked from commit b2d28f890872747d099a262e4a208e146b882f3f)
(cherry picked from commit a9f444a997cd0a26aae3dac821299adf0e944121)
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /840733 /opendev. org/openstack/ nova/commit/ b57fce8d14b9405 9c65526450468d4 8dab736983
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit b57fce8d14b9405 9c65526450468d4 8dab736983
Author: Balazs Gibizer <email address hidden>
Date: Tue Feb 22 12:24:37 2022 +0100
Fix eventlet.tpool import
Currently nova.utils. tpool_execute( ) only works by chance. And as the
bug report shows there are env where it fails.
The nova.utils. tpool_execute( ) call tries to uses eventlet. tpool.execute
but the tpool module is not imported by the utils module only eventlet.
In devstack it works by chance as the wsgi init actually imports
eventlet.tpool indirectly via:
Traceback (most recent call last): nova/nova/ api/openstack/ compute/ __init_ _.py", line 21, in <module> openstack. compute. routes import APIRouterV21 # noqa nova/nova/ api/openstack/ compute/ routes. py", line 20, in <module> openstack. compute import admin_actions nova/nova/ api/openstack/ compute/ admin_actions. py", line 17, in <module> nova/nova/ api/openstack/ common. py", line 27, in <module> nova/nova/ compute/ task_states. py", line 26, in <module> nova/nova/ objects/ fields. py", line 24, in <module> nova/nova/ network/ model.py" , line 23, in <module> nova/nova/ utils.py" , line 39, in <module> lib/python3. 8/dist- packages/ oslo_concurrenc y/processutils. py", line 57, in <module>
File "<stdin>", line 1, in <module>
File "/opt/stack/
from nova.api.
File "/opt/stack/
from nova.api.
File "/opt/stack/
from nova.api.openstack import common
File "/opt/stack/
from nova.compute import task_states
File "/opt/stack/
from nova.objects import fields
File "/opt/stack/
from nova.network import model as network_model
File "/opt/stack/
from nova import utils
File "/opt/stack/
from oslo_concurrency import processutils
File "/usr/local/
from eventlet import tpool
This was broken since I8dbc579e003796 9aab4f2bb500fcc fbde4190726. This
patch adds the correct import statement.
Change-Id: Ic46345ceeb4451 64aea6ae9b35c45 7c6150765f6 d099a262e4a208e 146b882f3f) 6aae3dac821299a df0e944121)
Closes-Bug: #1915400
(cherry picked from commit b2d28f890872747
(cherry picked from commit a9f444a997cd0a2