diff options
| author | Bartosz Bezak <bartosz@stackhpc.com> | 2026-04-23 12:33:57 +0200 |
|---|---|---|
| committer | Bartosz Bezak <bartosz@stackhpc.com> | 2026-04-23 15:03:13 +0000 |
| commit | fcc21812c4f720ed38eb574ca6144499d32c3013 (patch) | |
| tree | 18d36aedb5b4f5b9ef2e1c42919cb65a587d0952 | |
| parent | f0f9810b67afb7531e89cd683d44e49b9980d00f (diff) | |
| download | kolla-ansible-fcc21812c4f720ed38eb574ca6144499d32c3013.tar.gz kolla-ansible-fcc21812c4f720ed38eb574ca6144499d32c3013.zip | |
service-uwsgi-config: Add threads support
Allow services to set an explicit uWSGI thread count alongside
the default `enable-threads` setting [1].
Horizon now passes exising `horizon_wsgi_threads` to uWSGI.
[1] https://uwsgi-docs.readthedocs.io/en/latest/Options.html#threads
Change-Id: I0e33f2331ba10645f5947572c3d443647dd0c3a1
Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
| -rw-r--r-- | ansible/roles/horizon/tasks/config.yml | 1 | ||||
| -rw-r--r-- | ansible/roles/service-uwsgi-config/templates/uwsgi.ini.j2 | 3 | ||||
| -rw-r--r-- | releasenotes/notes/service_uwsgi_config_threads-e4c4867f204b94cf.yaml | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/ansible/roles/horizon/tasks/config.yml b/ansible/roles/horizon/tasks/config.yml index 8065779cf..5463169a9 100644 --- a/ansible/roles/horizon/tasks/config.yml +++ b/ansible/roles/horizon/tasks/config.yml @@ -78,6 +78,7 @@ service_uwsgi_config_tls_key: "/etc/horizon/certs/horizon-key.pem" service_uwsgi_config_uid: "{{ 'horizon' if enable_haproxy | bool else 'root' }}" service_uwsgi_config_workers: "{{ horizon_wsgi_processes }}" + service_uwsgi_config_threads: "{{ horizon_wsgi_threads }}" when: - service | service_enabled_and_mapped_to_host - horizon_wsgi_provider == "uwsgi" diff --git a/ansible/roles/service-uwsgi-config/templates/uwsgi.ini.j2 b/ansible/roles/service-uwsgi-config/templates/uwsgi.ini.j2 index 2c93d4e1b..ef0a5d373 100644 --- a/ansible/roles/service-uwsgi-config/templates/uwsgi.ini.j2 +++ b/ansible/roles/service-uwsgi-config/templates/uwsgi.ini.j2 @@ -30,6 +30,9 @@ wsgi-file = {{ service_uwsgi_config_wsgi_file }} plugins-dir = {{ '/usr/lib/uwsgi/plugins' if kolla_base_distro in ['ubuntu', 'debian'] else '/usr/lib64/uwsgi' }} plugins = python3 processes = {{ service_uwsgi_config_workers }} +{% if service_uwsgi_config_threads is defined %} +threads = {{ service_uwsgi_config_threads }} +{% endif %} {% if service_uwsgi_config_socket_port | length > 0 %} socket = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_socket_port }} {% endif %} diff --git a/releasenotes/notes/service_uwsgi_config_threads-e4c4867f204b94cf.yaml b/releasenotes/notes/service_uwsgi_config_threads-e4c4867f204b94cf.yaml new file mode 100644 index 000000000..69224c3bd --- /dev/null +++ b/releasenotes/notes/service_uwsgi_config_threads-e4c4867f204b94cf.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added ``service_uwsgi_config_threads`` to configure uWSGI thread count. + Horizon now applies ``horizon_wsgi_threads`` when using uWSGI. |
