Add support for [orchestrator] max_workers_reprocessing
... to control the number of processes the orchestrator service may spawn. Change-Id: Ibcb3f2444d8fa203efc557eb8c75aece863d167e Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*max_workers*]
|
||||
# (Optional) Maximal number of workers to run.
|
||||
# (Optional) Maximum number of workers to execute the rating process.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*max_workers_reprocessing*]
|
||||
# (Optional) Maximum number of workers to execute the reprocessing.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*max_threads*]
|
||||
@@ -17,9 +21,10 @@
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
class cloudkitty::orchestrator (
|
||||
$coordination_url = $facts['os_service_default'],
|
||||
$max_workers = $facts['os_service_default'],
|
||||
$max_threads = $facts['os_service_default']
|
||||
$coordination_url = $facts['os_service_default'],
|
||||
$max_workers = $facts['os_service_default'],
|
||||
$max_workers_reprocessing = $facts['os_service_default'],
|
||||
$max_threads = $facts['os_service_default']
|
||||
) {
|
||||
include cloudkitty::deps
|
||||
|
||||
@@ -33,8 +38,9 @@ class cloudkitty::orchestrator (
|
||||
Oslo::Coordination['cloudkitty_config'] -> Anchor['cloudkitty::service::begin']
|
||||
|
||||
cloudkitty_config {
|
||||
'orchestrator/coordination_url': value => $coordination_url, secret => true;
|
||||
'orchestrator/max_workers': value => $max_workers;
|
||||
'orchestrator/max_threads': value => $max_threads;
|
||||
'orchestrator/coordination_url': value => $coordination_url, secret => true;
|
||||
'orchestrator/max_workers': value => $max_workers;
|
||||
'orchestrator/max_workers_reprocessing': value => $max_workers_reprocessing;
|
||||
'orchestrator/max_threads': value => $max_threads;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``cloudkitty::orchestrator::max_workers_reprocessing`` parmaeter
|
||||
has been added.
|
@@ -15,6 +15,7 @@ describe 'cloudkitty::orchestrator' do
|
||||
:manage_config => false,
|
||||
)
|
||||
is_expected.to contain_cloudkitty_config('orchestrator/max_workers').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cloudkitty_config('orchestrator/max_workers_reprocessing').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cloudkitty_config('orchestrator/max_threads').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
@@ -22,9 +23,10 @@ describe 'cloudkitty::orchestrator' do
|
||||
context 'with parameters set' do
|
||||
let :params do
|
||||
{
|
||||
:coordination_url => 'etcd3+http://127.0.0.1:2379',
|
||||
:max_workers => 4,
|
||||
:max_threads => 20,
|
||||
:coordination_url => 'etcd3+http://127.0.0.1:2379',
|
||||
:max_workers => 4,
|
||||
:max_workers_reprocessing => 5,
|
||||
:max_threads => 20,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -36,6 +38,7 @@ describe 'cloudkitty::orchestrator' do
|
||||
:manage_config => false,
|
||||
)
|
||||
is_expected.to contain_cloudkitty_config('orchestrator/max_workers').with_value(4)
|
||||
is_expected.to contain_cloudkitty_config('orchestrator/max_workers_reprocessing').with_value(5)
|
||||
is_expected.to contain_cloudkitty_config('orchestrator/max_threads').with_value(20)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user