Fix wrong default value of qdr::router_worker_threads

The default should match processor counts instead of os_worker fact.
This module does not depend on openstacklib so we should not use
the fact provided that module.

Closes-Bug: #2023371
Change-Id: I534f29d75046a854a54b4c07cfb5757bfd39dd92
This commit is contained in:
Takashi Kajinami 2023-06-09 17:56:42 +09:00
parent d8afefaa60
commit b50afaee83
3 changed files with 14 additions and 11 deletions

View File

@ -147,7 +147,7 @@
#
# [*router_worker_threads*]
# (optional) Number of threads create to process message traffic
# Defaults to $::processorcount
# Defaults to $::facts['processors']['count']
#
class qdr(
$connectors = [],
@ -185,7 +185,7 @@ class qdr(
$router_remote_ls_max_age = '60',
$router_sasl_name = 'qdrouterd',
$router_sasl_path = '/etc/sasl2',
$router_worker_threads = $facts['os_workers'],
$router_worker_threads = $facts['processors']['count'],
) inherits qdr::params {
validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $router_debug_dump)

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Default value of the ``qdr::router_worker_threads`` parameter now matches
processor counts.

View File

@ -81,7 +81,7 @@ describe 'qdr' do
it do
should contain_file('qdrouterd.conf').with_content(/mode: standalone/)
should contain_file('qdrouterd.conf').with_content(/workerThreads: 8/)
should contain_file('qdrouterd.conf').with_content(/workerThreads: 1/)
should contain_file('qdrouterd.conf').with_content(/helloIntervalSeconds: 1/)
should contain_file('qdrouterd.conf').with_content(/helloMaxAgeSeconds: 3/)
should contain_file('qdrouterd.conf').with_content(/raIntervalSeconds: 30/)
@ -104,7 +104,7 @@ describe 'qdr' do
let :params do
{
:router_worker_threads => '4',
:router_worker_threads => 4,
:router_hello_interval => 2,
:router_hello_max_age => 6,
:router_ra_interval => 60,
@ -166,14 +166,12 @@ describe 'qdr' do
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts({
:os_workers => 8,
}))
end
}).each do |os,os_facts|
let :facts do
os_facts.merge({'processors' => {'count' => 1}})
end
context "on #{os}" do
let (:platform_params) do
case facts[:os]['family']
when 'Debian'