From d6a3f863290ab408fbfd4009dcbb3af315bf51c5 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Fri, 6 Jun 2025 15:19:31 +0200 Subject: [PATCH] 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 --- .zuul.yaml | 2 ++ doc/source/admin/concurrency.rst | 4 ++-- .../notes/threaded-nova-api-d8ec6704dcf66fb3.yaml | 8 ++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/threaded-nova-api-d8ec6704dcf66fb3.yaml diff --git a/.zuul.yaml b/.zuul.yaml index f3aa5ea4bd..4c65a845f5 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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 diff --git a/doc/source/admin/concurrency.rst b/doc/source/admin/concurrency.rst index 5d1813961e..e303ce117e 100644 --- a/doc/source/admin/concurrency.rst +++ b/doc/source/admin/concurrency.rst @@ -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 diff --git a/releasenotes/notes/threaded-nova-api-d8ec6704dcf66fb3.yaml b/releasenotes/notes/threaded-nova-api-d8ec6704dcf66fb3.yaml new file mode 100644 index 0000000000..531c16992b --- /dev/null +++ b/releasenotes/notes/threaded-nova-api-d8ec6704dcf66fb3.yaml @@ -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 `__ + guide for more details.