From e59a538bda20968b90b64cfce151fc8449412d24 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 10 Dec 2021 11:02:12 +0900 Subject: [PATCH] Add support for [conductor] soft_power_off_timeout Change-Id: Ie4b7cf1ccd072d5a7eba7f6fe0c7ad77b1aa53da --- manifests/conductor.pp | 7 +++++++ .../conductor-soft_power_off_timeout-f685c4c104467261.yaml | 5 +++++ spec/classes/ironic_conductor_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/conductor-soft_power_off_timeout-f685c4c104467261.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 1f7f89a8..9c7e7ad2 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -144,6 +144,11 @@ # sufficient DHCP configuration for port. # Defaults to $::os_service_default # +# [*soft_power_off_timeout*] +# (optional) Timeout (in seconds) of soft reboot and soft power off +# operation. +# Defaults to $::os_service_default +# # [*power_state_change_timeout*] # (optional) Timeout value to wait for a power operation to complete, # so that the baremetal node is in the desired new power state. @@ -244,6 +249,7 @@ class ironic::conductor ( $provisioning_network_name = undef, $rescuing_network_name = undef, $inspection_network_name = undef, + $soft_power_off_timeout = $::os_service_default, $power_state_change_timeout = $::os_service_default, $sync_power_state_interval = $::os_service_default, $sync_power_state_workers = $::os_service_default, @@ -353,6 +359,7 @@ Use inspect_wait_timeout instead') 'deploy/default_boot_option': value => $default_boot_option; 'deploy/default_boot_mode': value => $default_boot_mode; 'neutron/port_setup_delay': value => $port_setup_delay; + 'conductor/soft_power_off_timeout': value => $soft_power_off_timeout; 'conductor/power_state_change_timeout': value => $power_state_change_timeout; 'conductor/sync_power_state_interval': value => $sync_power_state_interval; 'conductor/sync_power_state_workers': value => $sync_power_state_workers; diff --git a/releasenotes/notes/conductor-soft_power_off_timeout-f685c4c104467261.yaml b/releasenotes/notes/conductor-soft_power_off_timeout-f685c4c104467261.yaml new file mode 100644 index 00000000..d1cccb17 --- /dev/null +++ b/releasenotes/notes/conductor-soft_power_off_timeout-f685c4c104467261.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``ironic::conductor`` class now supports customizing + the ``[conductor] soft_power_off_timeout`` parameter. diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index f3c7cee4..a0d16b80 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -77,6 +77,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('deploy/default_boot_option').with(:value => '') is_expected.to contain_ironic_config('deploy/default_boot_mode').with(:value => '') is_expected.to contain_ironic_config('neutron/port_setup_delay').with(:value => '') + is_expected.to contain_ironic_config('conductor/soft_power_off_timeout').with(:value => '') is_expected.to contain_ironic_config('conductor/power_state_change_timeout').with(:value => '') is_expected.to contain_ironic_config('conductor/sync_power_state_interval').with(:value => '') is_expected.to contain_ironic_config('conductor/sync_power_state_workers').with(:value => '') @@ -107,6 +108,7 @@ describe 'ironic::conductor' do :default_boot_option => 'local', :default_boot_mode => 'uefi', :port_setup_delay => '15', + :soft_power_off_timeout => 600, :power_state_change_timeout => '300', :sync_power_state_interval => 120, :sync_power_state_workers => 2, @@ -141,6 +143,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('deploy/default_boot_option').with_value(p[:default_boot_option]) is_expected.to contain_ironic_config('deploy/default_boot_mode').with_value(p[:default_boot_mode]) is_expected.to contain_ironic_config('neutron/port_setup_delay').with_value(p[:port_setup_delay]) + is_expected.to contain_ironic_config('conductor/soft_power_off_timeout').with_value(p[:soft_power_off_timeout]) is_expected.to contain_ironic_config('conductor/power_state_change_timeout').with_value(p[:power_state_change_timeout]) is_expected.to contain_ironic_config('conductor/sync_power_state_interval').with_value(p[:sync_power_state_interval]) is_expected.to contain_ironic_config('conductor/sync_power_state_workers').with_value(p[:sync_power_state_workers])