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-placement follow that standard configuration,
so that the default setup can be more consistent among all modules.

Change-Id: I7be4c1a5a61fcb8236d58804b9502cf7e3d0718b
This commit is contained in:
Takashi Kajinami
2020-06-30 23:06:22 +09:00
parent e23ee927c5
commit ac6e4e999b
3 changed files with 11 additions and 6 deletions

View File

@@ -44,7 +44,7 @@
#
# [*workers*]
# (Optional) Number of WSGI workers to spawn.
# Defaults to 1
# Defaults to $::os_workers
#
# [*priority*]
# (Optional) The priority for the vhost.
@@ -52,7 +52,7 @@
#
# [*threads*]
# (Optional) The number of threads for the vhost.
# Defaults to $::os_workers
# Defaults to 1
#
# [*wsgi_process_display_name*]
# (Optional) Name of the WSGI process display-name.
@@ -96,9 +96,9 @@ class placement::wsgi::apache (
$bind_host = undef,
$path = '/placement',
$ssl = true,
$workers = 1,
$workers = $::os_workers,
$priority = '10',
$threads = $::os_workers,
$threads = 1,
$wsgi_process_display_name = undef,
$ensure_package = 'present',
$ssl_cert = undef,

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

@@ -33,9 +33,9 @@ describe 'placement::wsgi::apache' do
:ssl_crl => nil,
:ssl_crl_path => nil,
:ssl_key => nil,
:threads => facts[:os_workers],
:threads => 1,
:user => 'placement',
:workers => 1,
:workers => facts[:os_workers],
:wsgi_daemon_process => 'placement-api',
:wsgi_process_display_name => nil,
:wsgi_process_group => 'placement-api',