diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 926b2423..ce5596b5 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -31,11 +31,6 @@ # (optional) Array of hardware types to load during service initialization. # Defaults to ['ipmi']. # -# [*max_time_interval*] -# (optional) Maximum time, in seconds, since the last check-in of a conductor. -# Should be an interger value -# Defaults to '120'. -# # [*force_power_state_during_sync*] # (optional) Should the hardware power state be set to the state recorded in # the database (True) or should the database be updated based on the hardware @@ -202,11 +197,17 @@ # after the next heartbeat. # Defaults to $::os_service_default # +# DEPRECATED PARAMETERS +# +# [*max_time_interval*] +# (optional) Maximum time, in seconds, since the last check-in of a conductor. +# Should be an interger value +# Defaults to undef. +# class ironic::conductor ( $package_ensure = 'present', $enabled = true, $enabled_hardware_types = ['ipmi'], - $max_time_interval = '120', $force_power_state_during_sync = true, $http_url = $::os_service_default, $http_root = $::os_service_default, @@ -239,6 +240,8 @@ class ironic::conductor ( $rescue_kernel = $::os_service_default, $rescue_ramdisk = $::os_service_default, $allow_provisioning_in_maintenance = $::os_service_default, + # DEPRECATED PARAMETERS + $max_time_interval = undef, ) { include ironic::deps @@ -247,6 +250,10 @@ class ironic::conductor ( # For backward compatibility include ironic::glance + if $max_time_interval != undef { + warning('ironic::conductor::max_time_interval is deprecated and has no effect') + } + if ($cleaning_network_name and !is_service_default($cleaning_network)) { fail('cleaning_network_name and cleaning_network can not be specified at the same time.') } @@ -307,7 +314,6 @@ class ironic::conductor ( # Configure ironic.conf ironic_config { 'DEFAULT/enabled_hardware_types': value => join($enabled_hardware_types, ','); - 'conductor/max_time_interval': value => $max_time_interval; 'conductor/force_power_state_during_sync': value => $force_power_state_during_sync; 'conductor/automated_clean': value => $automated_clean; 'conductor/api_url': value => $api_url; diff --git a/releasenotes/notes/deprecate-conductor-max_time_interval-fdcbc3f85820af19.yaml b/releasenotes/notes/deprecate-conductor-max_time_interval-fdcbc3f85820af19.yaml new file mode 100644 index 00000000..67b0890c --- /dev/null +++ b/releasenotes/notes/deprecate-conductor-max_time_interval-fdcbc3f85820af19.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + The ironic::conductor::max_time_interval was deprecated and has no effect. + The parameter will be removed in a future release. + diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index 3648bc57..aafbe074 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -26,7 +26,6 @@ describe 'ironic::conductor' do { :package_ensure => 'present', :enabled => true, :enabled_hardware_types => ['ipmi'], - :max_time_interval => '120', :force_power_state_during_sync => true } end @@ -63,7 +62,6 @@ describe 'ironic::conductor' do it 'configures ironic.conf' do is_expected.to contain_ironic_config('DEFAULT/enabled_hardware_types').with_value('ipmi') - is_expected.to contain_ironic_config('conductor/max_time_interval').with_value(p[:max_time_interval]) is_expected.to contain_ironic_config('conductor/force_power_state_during_sync').with_value(p[:force_power_state_during_sync]) is_expected.to contain_ironic_config('conductor/automated_clean').with(:value => '') is_expected.to contain_ironic_config('conductor/api_url').with(:value => '') @@ -92,7 +90,6 @@ describe 'ironic::conductor' do before :each do params.merge!( :enabled_hardware_types => ['ipmi', 'irmc'], - :max_time_interval => '50', :force_power_state_during_sync => false, :automated_clean => false, :cleaning_network => '00000000-0000-0000-0000-000000000000', @@ -124,7 +121,6 @@ describe 'ironic::conductor' do end it 'should replace default parameter with new value' do is_expected.to contain_ironic_config('DEFAULT/enabled_hardware_types').with_value('ipmi,irmc') - is_expected.to contain_ironic_config('conductor/max_time_interval').with_value(p[:max_time_interval]) is_expected.to contain_ironic_config('conductor/force_power_state_during_sync').with_value(p[:force_power_state_during_sync]) is_expected.to contain_ironic_config('conductor/automated_clean').with_value(p[:automated_clean]) is_expected.to contain_ironic_config('conductor/api_url').with_value(p[:api_url])