From dc3489df1816c8582f2a38ef8a2320778fe52aee Mon Sep 17 00:00:00 2001
From: Christian Berendt <berendt@b1-systems.de>
Date: Thu, 4 Jul 2019 16:29:04 +0200
Subject: [PATCH] Add parameters to configure number of processes and threads
 of horizon

Change-Id: Ib5490d504a5b7c9a37dda7babf1257aa661c11de
---
 ansible/roles/horizon/defaults/main.yml                    | 7 +++++++
 ansible/roles/horizon/templates/horizon.conf.j2            | 2 +-
 ...dd-horizon-apache-wsgi-parameters-282d4e07126663a6.yaml | 5 +++++
 3 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 releasenotes/notes/add-horizon-apache-wsgi-parameters-282d4e07126663a6.yaml

diff --git a/ansible/roles/horizon/defaults/main.yml b/ansible/roles/horizon/defaults/main.yml
index 70fa3dc646..cda8f0202e 100644
--- a/ansible/roles/horizon/defaults/main.yml
+++ b/ansible/roles/horizon/defaults/main.yml
@@ -97,6 +97,13 @@ horizon_logging_debug: "{{ openstack_logging_debug }}"
 horizon_keystone_url: "{{ keystone_internal_url }}/v3"
 
 
+####################
+# Apache
+####################
+horizon_wsgi_processes: "{{ openstack_service_workers }}"
+horizon_wsgi_threads: 1
+
+
 ####################
 # Kolla
 ####################
diff --git a/ansible/roles/horizon/templates/horizon.conf.j2 b/ansible/roles/horizon/templates/horizon.conf.j2
index 96ce3f1888..c839b25d3f 100644
--- a/ansible/roles/horizon/templates/horizon.conf.j2
+++ b/ansible/roles/horizon/templates/horizon.conf.j2
@@ -12,7 +12,7 @@ TraceEnable off
     CustomLog /var/log/kolla/horizon/horizon-access.log logformat
 
     WSGIScriptReloading On
-    WSGIDaemonProcess horizon-http processes={{ openstack_service_workers }} threads=1 user=horizon group=horizon display-name=%{GROUP} python-path={{ python_path }}
+    WSGIDaemonProcess horizon-http processes={{ horizon_wsgi_processes }} threads={{ horizon_wsgi_threads }} user=horizon group=horizon display-name=%{GROUP} python-path={{ python_path }}
     WSGIProcessGroup horizon-http
     WSGIScriptAlias / {{ python_path }}/openstack_dashboard/wsgi/django.wsgi
     WSGIPassAuthorization On
diff --git a/releasenotes/notes/add-horizon-apache-wsgi-parameters-282d4e07126663a6.yaml b/releasenotes/notes/add-horizon-apache-wsgi-parameters-282d4e07126663a6.yaml
new file mode 100644
index 0000000000..b4cf841f26
--- /dev/null
+++ b/releasenotes/notes/add-horizon-apache-wsgi-parameters-282d4e07126663a6.yaml
@@ -0,0 +1,5 @@
+---
+features:
+  - |
+    Added parameters ``horizon_wsgi_processes`` and ``horizon_wsgi_threads`` to configure
+    the number of processes and threads of WSGI in the Horizon container.
-- 
GitLab