From d950502c9c5055e117df1f7fa782a3ea261e5043 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Tue, 25 Jul 2017 17:17:32 +0100 Subject: [PATCH] Add options.workers to the template This change draws on the charms.openstack and layer-openstack-api changes to provide the ability to configure the number of workers that the aodh charm starts. Note that the mitaka version uses the simpler 'workers' option, whereas the ocata version uses the more complex WSGI version. Change-Id: I015b75cf674c03dd12078c13eb958b99e7936945 Depends-On: I3cea350e536306655f5f109ec67ae7f0fba35fda Depends-On: Id4145ffaa622727523003015d7012ece2f0eae4f Related-Bug: #1677543 --- src/templates/aodh.conf | 1 + src/templates/ocata/aodh-api.conf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/templates/aodh.conf b/src/templates/aodh.conf index 028beb5..c4417db 100644 --- a/src/templates/aodh.conf +++ b/src/templates/aodh.conf @@ -3,6 +3,7 @@ debug = {{ options.debug }} [api] port = {{ options.service_listen_info.aodh_api.port }} +workers = {{ options.workers }} [database] {% if shared_db.uri -%} diff --git a/src/templates/ocata/aodh-api.conf b/src/templates/ocata/aodh-api.conf index 0994280..295204e 100644 --- a/src/templates/ocata/aodh-api.conf +++ b/src/templates/ocata/aodh-api.conf @@ -1,7 +1,7 @@ Listen {{ options.service_listen_info.aodh_api.public_port }} - WSGIDaemonProcess aodh-api user=aodh group=aodh processes=2 threads=10 display-name=%{GROUP} + WSGIDaemonProcess aodh-api user=aodh group=aodh processes={{ options.wsgi_worker_context.processes }} threads=10 display-name=%{GROUP} WSGIProcessGroup aodh-api WSGIScriptAlias / /usr/share/aodh/app.wsgi WSGIApplicationGroup %{GLOBAL}