From 194e20d0ac409ba160db62a672bd7a913aeeb352 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 30 Jul 2025 21:33:40 +0900 Subject: [PATCH] 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 --- manifests/conductor.pp | 7 +++++++ ...nductor-graceful_shutdown_timeout-515da3056e522953.yaml | 5 +++++ spec/classes/ironic_conductor_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/conductor-graceful_shutdown_timeout-515da3056e522953.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index c1f42882..be8410de 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -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; diff --git a/releasenotes/notes/conductor-graceful_shutdown_timeout-515da3056e522953.yaml b/releasenotes/notes/conductor-graceful_shutdown_timeout-515da3056e522953.yaml new file mode 100644 index 00000000..72f16095 --- /dev/null +++ b/releasenotes/notes/conductor-graceful_shutdown_timeout-515da3056e522953.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``ironic::conductor::graceful_shutdown_timeout`` parameter has + been added. diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index 11b5f72a..b462ad09 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -89,6 +89,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('conductor/power_state_sync_max_retries').with(:value => '') is_expected.to contain_ironic_config('conductor/power_failure_recovery_interval').with(:value => '') is_expected.to contain_ironic_config('conductor/periodic_max_workers').with(:value => '') + is_expected.to contain_ironic_config('conductor/graceful_shutdown_timeout').with(:value => '') is_expected.to contain_ironic_config('conductor/conductor_group').with(:value => '') is_expected.to contain_ironic_config('conductor/deploy_kernel').with(:value => '') is_expected.to contain_ironic_config('conductor/deploy_ramdisk').with(:value => '') @@ -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])