Add service workers API config option
Add a service_workers config option to set the number of Manila API processes. By default, the value is set to ::os_workers. Change-Id: I6c5a843b0ef84aecd1262613551a4b4ea933a0ab
This commit is contained in:
parent
afb36bf81c
commit
10fcc31955
@ -56,6 +56,10 @@
|
||||
# (optional) Defines the enabled share protocols provided by Manila.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*service_workers*]
|
||||
# (optional) Number of manila-api workers
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# === DEPRECATED PARAMTERS
|
||||
#
|
||||
# [*service_port*]
|
||||
@ -75,6 +79,7 @@ class manila::api (
|
||||
$ratelimits_factory = 'manila.api.v1.limits:RateLimitingMiddleware.factory',
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$enabled_share_protocols = $::os_service_default,
|
||||
$service_workers = $::os_workers,
|
||||
# Deprecated
|
||||
$service_port = undef,
|
||||
) {
|
||||
@ -126,6 +131,7 @@ class manila::api (
|
||||
'DEFAULT/osapi_share_listen': value => $bind_host;
|
||||
'DEFAULT/enabled_share_protocols': value => $enabled_share_protocols;
|
||||
'DEFAULT/default_share_type': value => $default_share_type;
|
||||
'DEFAULT/osapi_share_workers': value => $service_workers;
|
||||
}
|
||||
|
||||
oslo::middleware { 'manila_config':
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add service_workers option to configure the number of API workers
|
@ -33,6 +33,7 @@ describe 'manila::api' do
|
||||
is_expected.to_not contain_manila_config('DEFAULT/os_region_name')
|
||||
is_expected.to contain_manila_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('DEFAULT/default_share_type').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('DEFAULT/osapi_share_workers').with(:value => '2')
|
||||
end
|
||||
|
||||
it 'should run db sync' do
|
||||
@ -62,6 +63,17 @@ describe 'manila::api' do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with service workers' do
|
||||
let :params do
|
||||
req_params.merge({'service_workers' => '4'})
|
||||
end
|
||||
it 'should configure the share workers' do
|
||||
is_expected.to contain_manila_config('DEFAULT/osapi_share_workers').with(
|
||||
:value => '4'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with only required params' do
|
||||
let :params do
|
||||
req_params.merge({'bind_host' => '192.168.1.3'})
|
||||
|
Loading…
x
Reference in New Issue
Block a user