Add support for [conductor] graceful_shutdown_timeout

This option was added during this cycle to replace the existing option
from oslo.service .

Depends-on: https://review.opendev.org/953335
Change-Id: Ie96677d2ef7ecd6ba50689c85906f817f325afac
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-07-30 21:33:40 +09:00
parent 557e72af54
commit 194e20d0ac
3 changed files with 15 additions and 0 deletions

View File

@@ -157,6 +157,11 @@
# simultaneously by a periodic task.
# Defaults to $facts['os_service_default']
#
# [*graceful_shutdown_timeout*]
# (optional) Maximum number of worker threads that can be started
# simultaneously by a periodic task.
# Defaults to $facts['os_service_default']
#
# [*conductor_group*]
# (optional) Name of the conductor group to join. This conductor will only
# manage nodes with a matching "conductor_group" field set on the node.
@@ -283,6 +288,7 @@ class ironic::conductor (
$power_state_sync_max_retries = $facts['os_service_default'],
$power_failure_recovery_interval = $facts['os_service_default'],
$periodic_max_workers = $facts['os_service_default'],
$graceful_shutdown_timeout = $facts['os_service_default'],
$conductor_group = $facts['os_service_default'],
$deploy_kernel = $facts['os_service_default'],
$deploy_ramdisk = $facts['os_service_default'],
@@ -380,6 +386,7 @@ class ironic::conductor (
'conductor/power_state_sync_max_retries': value => $power_state_sync_max_retries;
'conductor/power_failure_recovery_interval': value => $power_failure_recovery_interval;
'conductor/periodic_max_workers': value => $periodic_max_workers;
'conductor/graceful_shutdown_timeout': value => $graceful_shutdown_timeout;
'conductor/conductor_group': value => $conductor_group;
'conductor/deploy_kernel': value => $deploy_kernel;
'conductor/deploy_ramdisk': value => $deploy_ramdisk;

View File

@@ -0,0 +1,5 @@
---
features:
- |
The new ``ironic::conductor::graceful_shutdown_timeout`` parameter has
been added.

View File

@@ -89,6 +89,7 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/power_failure_recovery_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/periodic_max_workers').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/graceful_shutdown_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/conductor_group').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/deploy_kernel').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with(:value => '<SERVICE DEFAULT>')
@@ -135,6 +136,7 @@ describe 'ironic::conductor' do
:power_state_sync_max_retries => 5,
:power_failure_recovery_interval => 120,
:periodic_max_workers => 4,
:graceful_shutdown_timeout => 60,
:conductor_group => 'in-the-closet-to-the-left',
:deploy_kernel => 'http://host/deploy.kernel',
:deploy_ramdisk => 'http://host/deploy.ramdisk',
@@ -181,6 +183,7 @@ describe 'ironic::conductor' do
is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with_value(p[:power_state_sync_max_retries])
is_expected.to contain_ironic_config('conductor/power_failure_recovery_interval').with_value(p[:power_failure_recovery_interval])
is_expected.to contain_ironic_config('conductor/periodic_max_workers').with_value(p[:periodic_max_workers])
is_expected.to contain_ironic_config('conductor/graceful_shutdown_timeout').with_value(p[:graceful_shutdown_timeout])
is_expected.to contain_ironic_config('conductor/conductor_group').with_value(p[:conductor_group])
is_expected.to contain_ironic_config('conductor/deploy_kernel').with_value(p[:deploy_kernel])
is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with_value(p[:deploy_ramdisk])