Run nova-api and -metadata in threaded mode

It turns out that nova-api and nova-metadata only depend on spawning
threads via scatter-gather. The scatter-gather already supports both
eventlet and threading mode so we can switch these services.

Our WSGI services (nova-api, nova-metadata) are not relying on
oslo.service to fork worker processes, but expect the web server to
handle that (uwsgi, apache mod_wsgi). This means we don't need to handle
any forking issues as no nova code runs before the fork.

Change-Id: Id3a339c605dfc730bdb7994c3ca45baafeb5af80
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
This commit is contained in:
Balazs Gibizer
2025-06-06 15:19:31 +02:00
parent 3e33b58092
commit d6a3f86329
3 changed files with 12 additions and 2 deletions
+2
View File
@@ -475,6 +475,8 @@
# https://bugs.launchpad.net/nova/+bug/2110545
NOVA_COMPILE_MDEV_SAMPLES: False
'SYSTEMD_ENV_VARS["n-sch"]': OS_NOVA_DISABLE_EVENTLET_PATCHING=true
'SYSTEMD_ENV_VARS["n-api"]': OS_NOVA_DISABLE_EVENTLET_PATCHING=true
'SYSTEMD_ENV_VARS["n-api-meta"]': OS_NOVA_DISABLE_EVENTLET_PATCHING=true
devstack_services:
# Disable OVN services
br-ex-tcpdump: false
+2 -2
View File
@@ -24,8 +24,8 @@ threading mode at service startup via setting the environment variable
.. note::
Since nova 32.0.0 (2025.2 Flamingo) the nova-scheduler can be switched to
native threading mode.
Since nova 32.0.0 (2025.2 Flamingo) the nova-scheduler, nova-metadata, and
nova-api can be switched to native threading mode.
Tunables for the native threading mode
@@ -0,0 +1,8 @@
---
features:
- |
The nova-api and nova-metadata services now can be run in native threading
mode instead of with eventlet. This is an experimental feature that is
disabled by default. Please read the
`concurrency <https://docs.openstack.org/nova/latest/admin/concurrency.html>`__
guide for more details.