From 9e2422cc4ee8168ba64b68f8a33010c166beeb12 Mon Sep 17 00:00:00 2001 From: Arne Wiebalck Date: Fri, 20 Aug 2021 10:21:46 +0200 Subject: [PATCH] Expose sync_power_state_workers The sync_power_state_workers parameter allows to tune the parallelism in BMC connections when getting the power state. This may be needed to cope with misbehaving BMCs or IPMI power status failures due to UDP packet loss. Change-Id: I48e3f36115825f620dfc924fe097cdce92deb80d --- manifests/conductor.pp | 7 +++++++ .../add-sync-power-state-workers-57a03f7db87e679c.yaml | 4 ++++ spec/classes/ironic_conductor_spec.rb | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/add-sync-power-state-workers-57a03f7db87e679c.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 879b5181..62cc0b35 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -154,6 +154,11 @@ # in seconds. # Defaults to $::os_service_default # +# [*sync_power_state_workers*] +# (optional) Number of worker threads syncing the node power state to the +# database. +# Defaults to $::os_service_default +# # [*power_state_sync_max_retries*] # (optional) The number of times Ironic should try syncing the hardware node # power state with the node power state in the database. @@ -236,6 +241,7 @@ class ironic::conductor ( $inspection_network_name = undef, $power_state_change_timeout = $::os_service_default, $sync_power_state_interval = $::os_service_default, + $sync_power_state_workers = $::os_service_default, $power_state_sync_max_retries = $::os_service_default, $power_failure_recovery_interval = $::os_service_default, $conductor_group = $::os_service_default, @@ -356,6 +362,7 @@ Use inspect_wait_timeout instead') 'neutron/port_setup_delay': value => $port_setup_delay; '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; 'conductor/power_state_sync_max_retries': value => $power_state_sync_max_retries; 'conductor/power_failure_recovery_interval': value => $power_failure_recovery_interval; 'conductor/conductor_group': value => $conductor_group; diff --git a/releasenotes/notes/add-sync-power-state-workers-57a03f7db87e679c.yaml b/releasenotes/notes/add-sync-power-state-workers-57a03f7db87e679c.yaml new file mode 100644 index 00000000..d0e2a084 --- /dev/null +++ b/releasenotes/notes/add-sync-power-state-workers-57a03f7db87e679c.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Expose the ``sync_power_state_workers`` in ``ironic::conductor``. diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index 732ce0b0..c9590385 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -80,6 +80,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('neutron/port_setup_delay').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 => '') 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/conductor_group').with(:value => '') @@ -108,6 +109,7 @@ describe 'ironic::conductor' do :port_setup_delay => '15', :power_state_change_timeout => '300', :sync_power_state_interval => 120, + :sync_power_state_workers => 2, :power_state_sync_max_retries => 5, :power_failure_recovery_interval => 120, :conductor_group => 'in-the-closet-to-the-left', @@ -140,6 +142,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('neutron/port_setup_delay').with_value(p[:port_setup_delay]) 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]) 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/conductor_group').with_value(p[:conductor_group])