Use workers instead of threads in wsgi by default

In most of puppet-openstack modules, we use workers instead of threads
in wsgi to realize concurrency of api process by default.

This patch makes puppet-vitrage follow that standard configuration,
so that the default setup can be more consistent among all modules.

Change-Id: Icf5c7620291fe10e2a15e2189ea144751974fdb5
This commit is contained in:
Takashi Kajinami 2020-07-05 00:05:33 +09:00
parent 645913c3c4
commit 044e40dba3
3 changed files with 12 additions and 7 deletions

View File

@ -47,7 +47,7 @@
#
# [*workers*]
# Number of WSGI workers to spawn.
# Optional. Defaults to 1
# Optional. Defaults to $::os_workers
#
# [*priority*]
# (optional) The priority for the vhost.
@ -55,7 +55,7 @@
#
# [*threads*]
# (optional) The number of threads for the vhost.
# Defaults to $::os_workers
# Defaults to 1
#
# [*access_log_file*]
# The log file name for the virtualhost.
@ -107,7 +107,7 @@ class vitrage::wsgi::apache (
$bind_host = undef,
$path = '/',
$ssl = true,
$workers = 1,
$workers = $::os_workers,
$wsgi_process_display_name = undef,
$ssl_cert = undef,
$ssl_key = undef,
@ -116,7 +116,7 @@ class vitrage::wsgi::apache (
$ssl_crl_path = undef,
$ssl_crl = undef,
$ssl_certs_dir = undef,
$threads = $::os_workers,
$threads = 1,
$priority = '10',
$access_log_file = false,
$access_log_format = false,

View File

@ -0,0 +1,5 @@
---
fixes:
- |
In wsgi configuration, now workers is used to define concurrency by default
instead of threads, to be consistent with the other puppet modules.

View File

@ -14,9 +14,9 @@ describe 'vitrage::wsgi::apache' do
:path => '/',
:servername => facts[:fqdn],
:ssl => true,
:threads => facts[:os_workers],
:threads => 1,
:user => 'vitrage',
:workers => 1,
:workers => facts[:os_workers],
:wsgi_daemon_process => 'vitrage',
:wsgi_process_group => 'vitrage',
:wsgi_script_dir => platform_params[:wsgi_script_path],
@ -56,7 +56,7 @@ describe 'vitrage::wsgi::apache' do
:path => '/',
:servername => 'dummy.host',
:ssl => false,
:threads => facts[:os_workers],
:threads => 1,
:user => 'vitrage',
:workers => 37,
:wsgi_daemon_process => 'vitrage',