Merge "Support conductor options to determine max concurrency"

This commit is contained in:
Zuul 2024-09-11 22:02:35 +00:00 committed by Gerrit Code Review
commit 8de69232eb
3 changed files with 28 additions and 0 deletions

View File

@ -237,6 +237,16 @@
# a conductor.
# Defaults to $facts['os_service_default']
#
# [*max_concurrent_deploy*]
# (optional) The maximum number of concurrent nodes in deployment which are
# permitted in this Ironic system.
# Defaults to $facts['os_service_default']
#
# [*max_concurrent_clean*]
# (optional) The maximum number of concurrent nodes in cleaning which are
# permitted in this Ironic system.
# Defaults to $facts['os_service_default']
#
class ironic::conductor (
$package_ensure = 'present',
Boolean $enabled = true,
@ -282,6 +292,8 @@ class ironic::conductor (
$deploy_callback_timeout = $facts['os_service_default'],
$heartbeat_interval = $facts['os_service_default'],
$heartbeat_timeout = $facts['os_service_default'],
$max_concurrent_deploy = $facts['os_service_default'],
$max_concurrent_clean = $facts['os_service_default'],
) {
include ironic::deps
@ -372,6 +384,8 @@ class ironic::conductor (
'conductor/deploy_callback_timeout': value => $deploy_callback_timeout;
'conductor/heartbeat_interval': value => $heartbeat_interval;
'conductor/heartbeat_timeout': value => $heartbeat_timeout;
'conductor/max_concurrent_deploy': value => $max_concurrent_deploy;
'conductor/max_concurrent_clean': value => $max_concurrent_clean;
}
ironic_config {

View File

@ -0,0 +1,8 @@
---
features:
- |
The ``ironic::conductor`` class now supports the following conductor
options.
- ``max_concurrent_deploy``
- ``max_concurrent_clean``

View File

@ -104,6 +104,8 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/deploy_callback_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/heartbeat_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/heartbeat_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/max_concurrent_deploy').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/max_concurrent_clean').with(:value => '<SERVICE DEFAULT>')
end
context 'when overriding parameters' do
@ -148,6 +150,8 @@ describe 'ironic::conductor' do
:deploy_callback_timeout => 1800,
:heartbeat_interval => 10,
:heartbeat_timeout => 60,
:max_concurrent_deploy => 250,
:max_concurrent_clean => 50,
)
end
it 'should replace default parameter with new value' do
@ -191,6 +195,8 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/deploy_callback_timeout').with_value(p[:deploy_callback_timeout])
is_expected.to contain_ironic_config('conductor/heartbeat_interval').with_value(p[:heartbeat_interval])
is_expected.to contain_ironic_config('conductor/heartbeat_timeout').with_value(p[:heartbeat_timeout])
is_expected.to contain_ironic_config('conductor/max_concurrent_deploy').with_value(p[:max_concurrent_deploy])
is_expected.to contain_ironic_config('conductor/max_concurrent_clean').with_value(p[:max_concurrent_clean])
end
end
end